How to tell what type of object is being sent over a socket if the server side code looks like this
NetworkStream stream = socket.GetStream();
BinaryFormatter formatter = new BinaryFormatter();
formatter.Serialize(stream,objectToBeSent);
On the client I suppose you are going to read the data sent by the server and deserialize it back:
For this to work you will obviously need to include the assembly containing the serialized type on the client.
Oh and bare in mind that the BinaryFormatter class uses a non-interoperable format. This means that if you use for example different versions of the .NET frmaeowrk on the client and server this might not work. If this is the case you should use some interoperable data format protocol to exchange information between a server and a client.