In situations where people jump into sending objects "over the wire" for the first time, especially where noobs start sending images, is that they just go straight for sending the object or image. Well, if you just picked up the phone and dialed a number, the other side answered, and you just said "this image", the person on the other end of the call isn't going to know what you're talking about or what to do with that information. You haven't set up any context for a conversation. You don't have any protocol in place to describe what you're doing. You have to build your own communication protocol for setting up and maintaining both a conversation and subject context. The conversation should not start with shoving any old object onto the wire. You have to setup a context for conversation, or what you're going to be talking about. For example, start with "I'm going to send you 'such and such' object. The next x number of bytes will be the data for that object". Obviously, you don't send the full text of what I just posted. You send data that means what is in the quotes. Now you have a context to work with. The receiver will have a better idea of what it's looking at when that data shows up and what to do with it. Now, you also have to fill in the details for what to do when the receiver either gets too many bytes, or not enough, and other communication failures.
Asking questions is a skill CodeProject Forum Guidelines Google: C# How to debug code Seriously, go read these articles.
Dave Kreskowiak