I'm having a problem with sending a serialized object over a NetworkStream. I'm using the BinaryFormatter and the object is serialized and deserialized fine writing to a file.
If I use a streamwriter to send text it works fine after the Flush()
nStream = _tcpClient.GetStream() Dim sw As StreamWriter = New StreamWriter(nStream) sw.Write("Text to sent") sw.[B]Flush()[/B]
Now when I use the BinaryFormatter the object is serialized to the NetworkStream but the server never gets it
nStream = _tcpClient.GetStream() Dim bf As New BinaryFormatter() bf.Serialize(nStream, MyObject)
It look like it's waiting for a flush or something.
I hope someone can help me