> Ok, then I must manage the received buffer by myself?
> cutting and joining so that it can be interpreted perfectly by the 
> receiver,
> is that right?

Yes and no :-)
TWSocket has a "line mode" in which it assemble (or split) packets for you.
You specify a delimiter (default to #13#10 but can be anything), tunr line 
mode on and then you get OnDataAvailable triggered only when one complete 
line (well anything terminated by your delimiter) has been received. If a 
line is split in several packets, or a single packet contain several lines, 
TWSocket will always trigger exactly one OnDataAvailable per line received.

If you don't use line mode, then you must design your protocol the way you 
like. Basically, your receiver has to know what the sender is sending ! If 
not using a delimiter (line mode), then you either have to send fixed length 
record, or send somewhere the length or the type of your record (probably at 
the start of the record).

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

Reply via email to