http://msdn.microsoft.com/en-us/library/ms741580%28VS.85%29.aspx

The return value indicates the error code for this thread's last Windows Sockets operation that failed.