title: Using TcpClient on websocket receive data get \0\0\0\0
body: <p>I have establish a connection with a websocket , i want to receive message from it. Following is my code for receiving message from the websocket.</p>
  
  <pre><code>//mClient is my TCP connection
  byte[] bytes;
  NetworkStream netStream;              
  string returndata;
  while(true)
  {
  bytes = new byte[mClient.ReceiveBufferSize];
  netStream = mClient.GetStream();
  netStream.Read(bytes, 0, (int)mClient.ReceiveBufferSize);            
  returndata = Encoding.UTF8.GetString(bytes);
  Console.WriteLine("This is what the host returned to you: " + returndata);
  }
  </code></pre>
  
  <p>The data should be some json array when I open with browser , but i have  receive weird data like</p>
  
  <pre><code>??\0\0\0\0\0\0\0\0\0\0\
  </code></pre>
  
  <p>And the second loop onwards is forever </p>
  
  <blockquote>
    <p>\0\0\0\0\0\0\0\0\0\0\0</p>
  </blockquote>
  
  <p>I have seen a <a href="https://stackoverflow.com/questions/36079517/tcpclient-sometimes-recieving-empty-bytes-array">Similar Question</a> but i have no idea on his answer. May I know how to fix this thing and what is the problem ?</p>