Our PS2 Game Client software is in C++. I would like to write the new server in
Java. The problem I've had with this in the past is that I can neatly create a stuct or class in C++, send it over the wire, cast the data to that same struct/class and easily get all my data.
However, having to serialize it in Java, do the byte array thing and put each byte back in the right place is a major pain and VERY bug prone. It reminds me of hacking in assembler.
There must be a better way. The only thing I can think of is to send all the data as name/value pairs in ASCII and use the StringTokenizer (like message = <userIP=10.65.30.112, userName=MrKrispy>
. The problem with that is the data size is much larger than sending it all in binary.
Any ideas or help would be greatly appreciated.
Thanks!