The problem was on the receiver side. Inside DataAvailable there are 
onerous instructions for CPU. So winsock messages tend to accumulate in 
Message queue.
When new packets arrive, the receiver progressively reduce TCP sliding 
window until 0.
Now, with a dedicated thread that manage winsock messages, the problem 
disappear.
Thankyou,
Emanuele

Dan ha scritto:
> You can use OnDataSent to know when WSocket has sent all its data to Winsock
> and you can send some more.  If TCP window goes to 0 as you put it, then
> Winsock wont be able to send anymore so you wont get the OnDataSent until it
> can.  So, say you have a file to send, send it in blocks of a few KB at a
> time.  When you get OnDataSent send the next few KB.  This also avoids
> filling WSockets buffers up too much and wasting memory.
>
> Dan
>
>   

-- 
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