Object to Network serialization - with an existing protocol

Posted by cpf on Stack Overflow See other posts from Stack Overflow or by cpf
Published on 2010-04-16T18:03:04Z Indexed on 2010/04/17 11:43 UTC
Read the original article Hit count: 217

I'm writing a client for a server program written in C++. As is not unusual, all the networking protocol is in a format where packets can be easily memcopied into/out of a C++ structure (1 byte packet code, then different arrangements per packet type).

I could do the same thing in C#, but is there an easier way, especially considering lots of the data is fixed-length char arrays that I want to play with as strings? Or should I just suck it up and convert types as needed? I've looked at using the ISerializable interface, but it doesnt look as low level as is required.

© Stack Overflow or respective owner

Related posts about c#

Related posts about networking