[EMAIL PROTECTED] a écrit :
> This is not exactly the answer for my question.
> Think of coding the Picture-Data in just readable Ascii-Characters. This 
> maybe result in a very large string, ended with #13#10. I thought this 
> result in a single OnDataAvailable-Event where I can read the whole string 
> with one call to receivestr. I thought TWSocket concats the single parts 
> until it finds the #13#10 (in linemode of course) and fires a single 
> onDataAvailable-Event.
> 
> Am I wrong?
> 
> Naturally this is not a good approach - sending it binary with a special 
> data-structure is much better.

I would suggest not to rely on the LineMode enabled, especially when 
sending binary files such as pictures as some #13#10 caracters can be 
part of the picture.

or, if you really want to have some textual data, then prefer to use 
some http streaming (each pictures separated by boundaries), ie :
...
------myboundary<crlf>
Content-type: image/jpeg<crlf>
Content-length: 20485<crlf>
<crlf>
<jpeg binary data><crlf>
------myboundary<crlf>
Content-type: image/jpeg<crlf>
Content-length: 20238<crlf>
<crlf>
<jpeg binary data><crlf>
...

HTH,

Best regards,

-- 

Guillaume MAISON - [EMAIL PROTECTED]
83, Cours Victor Hugo
47000 AGEN
Tél : 05 53 87 91 48 - Fax : 05 53 68 73 50
e-mail : [EMAIL PROTECTED] - Web : http://nauteus.com

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