title: C++ Winsock - accept()
body: <p>I've started tying to learn Winsock with C++ and I'm having some problems.
  I started by following the Winsock Example on MSDN ( a basic client-server ).
  <a href="http://msdn.microsoft.com/en-us/library/ms738545(v=vs.85).aspx" rel="nofollow">http://msdn.microsoft.com/en-us/library/ms738545(v=vs.85).aspx</a></p>
  
  <p>When I build and run the code I get the output:</p>
  
  <p><strong>Client.exe</strong></p>
  
  <p>14 bytes sent.<br>
  Connection closed.</p>
  
  <p><strong>Server.exe</strong></p>
  
  <p>Nothing happens in the Server.exe cmd window.
  I have no clue what I am doing wrong.   I am new to Winsock, but as far as I call tell in the Server.cpp file the accept() function never returns.</p>
  
  <p>Any help / pointers are appreciated.<br>
  Thanks in advance, Tom.</p>
  
  <p><strong>EDIT</strong> The code can be found on the above MSDN Link. Scroll down on the page for the code for Client and Server.</p>