title: Asynchronous Sockets Serialization & Deserialization
body: <p>I have a problem in receiving an object from my client which is written in Java.
  am 100% sure of my client code and it's good.
  but when i try to receive from my C# Asynchronous Server several errors come above
  i think it's because the stream which i really don't know how to get it</p>
  
  <pre><code>int iRx = socketData.m_currentSocket.EndReceive(asyn);
  byte[] receivedData = socketData.dataBuffer;
  MemoryStream memStream = new MemoryStream();
  BinaryFormatter binForm = new BinaryFormatter();
  memStream.Write(receivedData, 0, receivedData.Length);
  memStream.Seek(0, SeekOrigin.Begin);
  UserData usdata = (UserData)binForm.Deserialize(memStream);
  </code></pre>