Hi Francois,

> As far as I know, "TCP zero window" is sent when the comiter is not able to
> receive data anymore because the receive buffer is full. And still as far as
> I know this is not an error if it doesn't persist for too long. It is simply
> part of the control flow in TCP protocol.

> Speaking about your application: are you sure you still receive data ? From
> OnDataAvailable event handler, you must receive everything or you enter an
> infinite loop when wsoNoReceiveLoop is not activated and if activated but
> you don't call Receive, then you don't get any notification before you cxall
> Receive.

Yes, without wsoNoReceiveLoop, I'm able to receive the whole 200MB
file. With wsoNoReceiveLoop, it breaks in the middle. It's yet to
find out why

I think my code works similarly to httpprot, with the exception
of having wsoNoReceiveLoop commented out. The client receives everything
in the OnDataAvailable handler, calculates the bandwith, if too high,
calls Pause. Then in a timer, when the average bandwidth drops, Resume
is called.

You and Wilfried explained that wsoNoReceiveLoop stops the loop.
I thought Pause does this as well? When Pause is called, am I supposed
to get OnDataAvailable events? I guess I'm not clear on how
wsoNoReceiveLoop interacts with Pause and Resume.

> If you call Pause, obviously you are no more notifyed when data comes in.
> This will fill the receive buffer until full and at that time the peer will
> recive the zero window message. Before timeout you must call resume and
> probably Receive as well to restart the receiving process.

Yes, resume is called in a timer handler, similar to httpprot.

To unsubscribe or change your settings for TWSocket mailing list
please goto http://www.elists.org/mailman/listinfo/twsocket
Visit our website at http://www.overbyte.be

Reply via email to