Partially correct.  You don't need an extra FIFO buffer externally to
TWSocket because TWSockets buffers are FIFO buffers.  You are right that
these will grow until you run out of memory if you cant send data as fast as
you receive it.  But you said in your case you cannot control the rate your
random is arriving at (or did I misinterpret?) so what else can you do
except keep buffering it, or error?  You could write your own buffering to
disk I suppose...

Dan

-----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On
Behalf Of Angus Robertson - Magenta Systems Ltd
Sent: 19 November 2006 11:22
To: twsocket@elists.org
Subject: Re: [twsocket] Flow control

> Use event OnDataSent to control the flow, and to avoid grow of 
> TWSocket's send buffer.

That is impossible for random data, unless an extra FIFO buffer is used 
externally to TWSocket.  

Trying to understand how TIcsBufferHandler works, it appears to be 
multiple 1,460 byte blocks (TIcsBuffer), with new blocks being added if 
data can not be sent sufficiently fast.  

So I guess the answer to my question is there is no flow control and the 
buffers will just keep growing if data can not be sent fast enough, 
until the application runs out of memory. 

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


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