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 ). http://msdn.microsoft.com/en-us/library/ms738545(v=vs.85).aspx
When I build and run the code I get the output:
Client.exe
14 bytes sent.
Connection closed.
Server.exe
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.
Any help / pointers are appreciated.
Thanks in advance, Tom.
EDIT The code can be found on the above MSDN Link. Scroll down on the page for the code for Client and Server.