Well... That's a much bigger issue... These are stuff you need to figure out on your own. :) Search for articles and code exemples to get the idea... Here are a few ideas and guidelines: - You can use .NET Remoting to use objects from the server on you client. This will release you from the need of designing an entire protocol. You would simply instantiate an object and use it as if it was an object instantiated on the client's side. So find material on .NET Remoting! - If you intend to use serialization, here are a few ideas: Lets say the client wants to receive a list of the directories in drive c:. You can create a class which will hold the requested path, like so:
[Serializable]
class DirectoryListRequest
{
private string pathToExplore;
...
}
Then you instantiate an object of type DirectoryListRequest and serialize it to your NetworkStream. The server then deserializes it, reads the pathToExplore field and instantiates its own object of type DirectoryListReply. Then the server serializes the DirectoryListReply object to the NetworkStream, and the client deserializes it, and so on... Good luck, Shy.