OK.  I understand what you're saying, which for me is a definite step
up.  That being said, when would I actually act on the data that I have
received from the socket?  If I have LineMode off, that means I have to
either 1) look for a terminator or 2) accept <x> many bytes and then act
on the information I have so far, correct?

Correct. You can select either way. In anycase, don't forget that you may receive more data that what you want. Of course you have to keep the extra data into your buffer. For example, even if you send an integer (4 bytes) as length and then send the actual data in a separate send, you may well receive your count and your actual data in a single packet and a single OnDataAvailable event.

Again, as I've seen in archive here before, what happens if my
information gets processed in two batches (packets)?  When do I decide
OK, enough is enough, and continue on processing?  Is TWSocket
neccessarily fit for binary-type protocols like Napster/ICQ/WASTE/etc
with variable-length packets?

Yes of course. What you talk about is not TWSocket specific. It is just that TCP/IP work like that. Specially, TCP is a stream oriented protocol. It is suitable for transmitting any kind of data using any kind of TCP/IP based protocol.


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