Re: [twsocket] Sending binary data

2008-05-07 Thread Wilfried Mestdagh
Hello Daniel, It is indeed not a rare situation. Sending the length of the data first is a good idea, I do it often. another simple option is to escape some characters and still use lineMode. You have to escape the LineEnd characters as whell as the escape byte. See also http://wiki.overbyte.be fo

Re: [twsocket] Sending binary data

2008-05-07 Thread Angus Robertson - Magenta Systems Ltd
> I'm using plain TCP with TWSocket and would like to send binary > data. So far i've been sending text and used line mode, so I wonder > how to handle binary data. You can emulate FTP and send the binary data on a second socket, that's closed once it's finished. Or packet up your data with s

[twsocket] Sending binary data

2008-05-07 Thread Daniel Mauric
Hi, I'm using plain TCP with TWSocket and would like to send binary data. So far i've been sending text and used line mode, so I wonder how to handle binary data. One option would be to encode to say base64 and so still use line mode, but that would make data larger, so I'd prefer to send binar