Windows Socket Error Codes

WSAEINTR

10004 Interrupted system call.
WSAEBADF 10009 Bad file number.
WSEACCES 10013 Permission denied.

WSAEFAULT

10014 Bad address.
WSAEINVAL 10022 Invalid argument .
WSAEMFILE 10024 Too many open files.

WSAEWOULDBLOCK

10035 Operation would block.
WSAEINPROGRESS 10036 Operation now in progress. This error is returned if any Windows Sockets API function is called while a blocking function is in progress.
WSAEALREADY 10037 Operation already in progress.

WSAENOTSOCK

10038 Socket operation on nonsocket.
WSAEDESTADDRREQ 10039 Destination address required.
WSAEMSGSIZE 10040 Message too long.

WSAEPROTOTYPE

10041 Protocol wrong type for socket.
WSAENOPROTOOPT 10042 Protocol not available
WSAEPROTONOSUPPORT 10043 Protocol not supported.

WSAESOCKTNOSUPPORT

10044 Socket type not supported.
WSAEOPNOTSUPP 10045 Operation not supported on socket.

WSAEPFNOSUPPORT

10046 Protocol family not supported.
WSAEAFNOSUPPORT 10047 Address family not supported by protocol family.
WSAEADDRINUSE 10048 Address already in use.

WSAEADDRNOTAVAIL

10049 Cannot assign requested address.
WSAENETDOWN 10050 Network is down. This error may be reported at any time if the Windows Sockets implementation detects an underlying failure.

WSAENETUNREACH

10051 Network is unreachable.
WSAENETRESET 10052 Network dropped connection on reset.
WSAECONNABORTED 10053 Software caused connection abort.
WSAECONNRESET 10054 Connection reset by peer.

WSAENOBUFS

10055 No buffer space available.
WSAEISCONN 10056 Socket is already connected.
WSAENOTCONN 10057 Socket is not connected.

WSAESHUTDOWN

10058 Cannot send after socket shutdown.
WSAETOOMANYREFS 10059 Too many references: cannot splice.
WSAETIMEDOUT 10060 Connection timed out.

WSAECONNREFUSED

10061 Connection refused.
WSAELOOP 10062 Too many levels of symbolic links.
WSAENAMETOOLONG 10063 File name too long.
WSAEHOSTDOWN 10064 Host is down.

WSAEHOSTUNREACH

10065 No route to host.
WSAEPROCLIM 10067 Too many processes.
WSASYSNOTREADY 10091 Returned by WSAStartup(), indicating that the network subsystem is unusable.

WSAVERNOTSUPPORTED

10092 Returned by WSAStartup(), indicating that the Windows Sockets DLL cannot support this application.
WSANOTINITIALISED 10093 Winsock not initialized. This message is returned by any function except WSAStartup(), indicating that a successful WSAStartup() has not yet been performed.
WSAEDISCON 10101 Disconnect.

WSATYPE_NOT_FOUND

10109 Class type not found.
WSAHOST_NOT_FOUND 11001 Host not found. This message indicates that the key (name, address, and so on)was not found.
WSATRY_AGAIN 11002 Nonauthoritative host not found. This error may suggest that the name service itself is not functioning
WSANO_RECOVERY 11003 Nonrecoverable error. This error may suggest that the name service itself is not functioning

WSANO_DATA

11004 Valid name, no data record of requested type. This error indicates that the key (name, address, and so on) was not found.

 

Windows Socket Errors Continued
WSA_INVALID_HANDLE (Operating system dependent)
 

Translation:

Specified event object handle is invalid.
Description: A program tried to use an event object, but the specified handle is not valid.

WSA_INVALID_PARAMETER

(Operating system dependent)
  Translation: One or more parameters are invalid
Description: A program used a Windows Sockets function that directly maps to a Win32 function. The Win32 function is indicating a problem with one or more parameters.
WSA_I-O_INCOMPLETE (Operating system dependent)
 

Translation:

Overlapped I/O event object not in signaled state.
Description: The program has tried to determine the status of an overlapped operation that is not yet completed. Programs that use WASGetOverlappedResult (with the fWait flag set to FALSE) in a polling mode to determine when an overlapped operation has completed receive this error code until the operation is complete
WSA_I-O_PENDING (Operating system dependent)
  Translation: Overlapped operations will complete later

Description:

The program has initiated an overlapped operation that canot be completed immediately. A completion indication is sent later when the operation has been completed.
WSA_NOT_ENOUGH_MEMORY (Operating system dependent)
  Translation: Insufficient memory available.

Description:

A program used a Windows Sockets function that directly maps to a Win32 function. The Win32 function is indicating a lack of required memory resources.
WSA_OPERATION_ABORTED (Operating system dependent)
 

Translation:

Overlapped operation aborted.
Description: An overlapped operation was cancelled because the socket was closed or the SIO_FLUSH command in WSAIoctl (Wsapiref_6ik2.asp) was ran
WSAINVALIDPROCTABLE (Operating system dependent)
  Translation: Invalid service provider version number

Description:

A service provider returned an invalid procedure table to Ws2_32.dll (This is typically caused by one or more of the function pointers being null.)
WSAINVALIDPROVIDER (Operating system dependent)
  Translation: Invalid service provider version number

Description:

A service provider returned a version number other than 2.0.
WSAPROVIDERFAILEDINIT (Operating system dependent)
  Translation: Unable to initialize a service provider

Description:

Either a service provider’s DLL cannot be loaded (LoadLibrary failed) or the provider’s WSPStartup/NSPStartup function failed.
WSASYSCALLFIALURE (Operating system dependent)
 

Translation:

System call failure.
Description: This error is returned when a system call that should never fail fails. For example, this error occurs if a call to WaitForMultipleObjects fails or one of the registry functions fails trying to change the protocol or name space catalogs.