Well it isn't that hard to do some error checks and find out the error from WSAGetLastError(). You may need to check the return of every function used and check the documentation a lot. If you don't like googling the error number you can use FormatMessageA/W which you can figure out. You probably also read the comment to initialize WSA right?