> I have been working with ICS for some time and I had the same problem as
> you, I have read the ICS source code and I saw that it doesn´t have this
> flow control on send, what they have is the internal buffer where data is
> stored and sent in background, so, for example, if you have a 56kbps
> connection to send the data and you try to send for example 1mbps of data
> using the send routine, the internal buffer will keep growing and growing
> and growing, I don´t know if this is correct, but this is what I have
> concluded reading the source, because the send routine always put your
> into internal buffer, growing it as data is incoming.
It is correct.
The idea of flow control with TWSocket is to send a data chunk (for example
4KB) and then from the OnDataSent event get the next data chunk. This way
the buffer never grow beyond 4KB. This is what the FTP and HTTP component
do. They could read files very fast but this would simply load most of the
file into the buffer (RAM). So it read one chunk from the file and then from
OnDataSent read the next chunk.
On the network, the sending doesn't really send since when TWSocket has
emptyed his buffer (OnDataSent is triggered at that time), winsock has his
own buffer (8KB by default) filled. So while the application refill TWSocket
buffer, winsock still send data to the network from his own buffer.
Contribute to the SSL Effort. Visit http://www.overbyte.be/eng/ssl.html
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