I have a client application that serializes a object and sends it to a server application. The server should deserialize the object, make changes to it, then serialize it an
You could use a higher level framework like WCF, or if you are hell-bent on managing your own streams, then don't use ReadToEnd()- use ReadLine() (and have the client send messages as lines), or use Read() and have a special character (a sentinel) represent the end of a message.