hehe type packing is something I also very often forget when I port stuff

Why do you handle it as raw strings? What if you send a zero integer? It would make a string like this: #0#0#0#0. If at some point the string is seen as nullterminated the whole datapacket would be lost.

I haven't figured out when or not strings are defined as nullterminated. But I've had quite a few problems with it in delphi