title: c++ winsock - recv() returns incorrect and strange buffer
body: <p>I am writing a simple game named "TicTacToe". I also wanted to create a network function using WinSock. While connection between two users goes without errors, I can't receive any correct data. After receiving it, the buffer is filled with a strange characters like "☺$0/A", etc., while it should receive "Hello!".</p>
  
  <p>Here's my code:</p>
  
  <pre><code>const char buf[] = "Hello!";
  char rbuf[16];
  int bytes = 0;
  memset(buf, 0, sizeof(buf));
  
  // sending
  
  send(sox, buf, sizeof(buf), 0);
  
  // recv
  
  bytes = recv(sox, rbuf, 16, 0)
  rbuf[bytes] = '\0';
  cout &lt;&lt; rbuf &lt;&lt; endl;
  </code></pre>