|
From: | vincent cui |
Subject: | Re: [lwip-users] tcp_sndbuf return 0 when sending file |
Date: | Fri, 13 Apr 2012 00:32:36 +0000 |
Hi simon: When I receive tcp packet from client, I found that tcp payload is 970 and 490 by calling following code for (q = p; q != NULL; q = q->next)
{
UINT len;
printf(" tcp payload len : %d \n", q->len); f_write(fsd->fil, q->payload, q->len, &len); tot_len += len;
if (len != q->len)
break;
}
And TCP_MSS is (1500 �C 40). So tcp received packet maximum data is 1460 (970 + 490),
I wonder to know that there is a way to extend the value ? change TCP_MSS to 2048 ?
Vincent Cui From:
lwip-users-bounces+address@hidden [mailto:lwip-users-bounces+address@hidden
On Behalf Of address@hidden vincent cui wrote: All I develop a FTP server with lwIP 1.3.2 in Cortex M3 platform, when I use FlashFXP to get file from the server, the tcp_sndbuf always return 0 after work a while .
I capture it with wireshark, the file is attached file. The server ip: 192.168.1.51. it seems that transfer error and need retransmission.
My sendcode in server is below: [..] err = tcp_write(pcb, fsd->fifo.buffer + i, (u16_t)(fsd->fifo.size - i), 1);
Yikes! Using numbers instead of constants is really a thing people should learn (I'm speaking of TCP_WRITE_FLAG_COPY
vs. '1')! |
[Prev in Thread] | Current Thread | [Next in Thread] |