|Subject:||Re: [lwip-users] socket write hangs, in LwIP 1.4.? (ppp-new branch but not ppp related)|
|Date:||Fri, 21 Dec 2012 11:11:54 +0100|
|User-agent:||Mozilla/5.0 (Macintosh; Intel Mac OS X 10.6; rv:16.0) Gecko/20121010 Thunderbird/16.0.1|
Mark Lakata wrote:
I'm not sure how to get the size of the "connections's TX/RX window sizes".
The easiest way is wiresharp. Posting a pcap here might help us to look at what's going on.
Here is a snippet from the lwipopts.h.
Using half the MSS should work (if it doesn't, it should be a bug in lwIP), but it's not recommended to do so. TCP needs at leasst 4*MSS to work efficiently. I bet with TCP_SND_BUF and TCP_WND set to 2*TCP_MSS, your problems are gone.
The problem here is that TCP tries to prevent sending too many ACKs/window-updates. Most TCP implementations only send an ACK if the resulting change for the remote client is one MSS, this is why you easily run into problems with WND==2*MSS and lwIP splitting up send-data into MSS-sized chunks.
|[Prev in Thread]||Current Thread||[Next in Thread]|