----- Original Message ----- 
From: "Francois PIETTE" <[EMAIL PROTECTED]>
To: "ICS support mailing" <twsocket@elists.org>
Sent: Sunday, February 19, 2006 3:57 PM
Subject: Re: [twsocket] Sending directly, not via Send Buffer


>> 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,
> WSocket will always trigger exactly one OnDataAvailable per line received.

Is this completely true.  I'm sure in the past I've had a receive call 
return multiple lines, something like "This is one line'#13#10'this is the 
next'#13#10'".  And I had to split multiple lines, and process individually. 
I don't know if this is a bug that was once fixed, but I remember having to 
do it when I first started using TWSocket (years ago), and have done ever 
since.

Dan

>
> 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
> --
> [EMAIL PROTECTED]
> 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
> 

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