Ossehaas 0 Light Poster

Hi, I have a question. I'm studying MCTS Application Development Foundation .NET 2.0 VB and I have a Server - Client Messenger app to exchange text. One NetworkStream is used both for reading and writing the strings.

Now I want to exchange different types of objects to and from the server, (like a registration object, a profile object or maybe an image) . Is it possible to use the same NetworkStream used for the text and filter it by type or do I have to use different networkstreams and/or listen to different incomming ports?

How can a server know what to expect if different types of Serialized objects can be send?

I hope someone can help me or point me in the right direction.