Transfer Binary Messages via Sockets?

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hello All,

I'm playing with an application that needs to send binary serialized objects across the network... I'm wondering what the best method to do this would be? Specifically, I'm wondering how best to tell the application that it has received the entire binary package?

With a traditional 'chat' application using sockets you could designate a particular delimiter as the end of message... such as '|'. Trying to impliment something like this for binary data feels like a hack... Am I going ot have to go all out and use FTP or some such to 'manage' the data connection?

If you have any suggestions or could point me to additional resources I'd greatly appreciate it. Thank you for your valuable time.
 
You might want to adopt the idea of adding headers to your outbound message.
To start you would need only one header: Content-Length: where content
length would tell you how long the binary data is that follows.

Chris said:
Hello All,

I'm playing with an application that needs to send binary serialized
objects across the network... I'm wondering what the best method to do this
would be? Specifically, I'm wondering how best to tell the application that
it has received the entire binary package?
With a traditional 'chat' application using sockets you could designate a
particular delimiter as the end of message... such as '|'. Trying to
impliment something like this for binary data feels like a hack... Am I
going ot have to go all out and use FTP or some such to 'manage' the data
connection?
If you have any suggestions or could point me to additional resources I'd
greatly appreciate it. Thank you for your valuable time.
 
Back
Top