1. Winsock error code
2.
Error Codes and causes of Windows Sockets errors
Table excerpt:
Windows Sockets error code |
Error code corresponding to Berkeley |
Error Code |
Release |
Wsaeintr |
Eintr |
10004 |
Same as standard C |
Wsaebadf |
Ebadf |
10009 |
Same as standard C |
Wsaeacces |
Eacces |
10013 |
Same as standard C |
Wsaefault |
Efault |
10014 |
Same as standard C |
Wsaeinval |
Einval |
10022 |
Same as standard C |
Wsaemfile |
Emfile |
10024 |
Same as standard C |
Wsaewouldblock |
Ewouldblock |
10035 |
Same as BSD |
Wsaeinss SS |
Einprogress |
10036 |
This error is returned when a blocking function is in progress and any Windows Sockets API function is called. |
Wsaealready |
Ealready |
10037 |
Same as BSD |
Wsaenotsock |
Enotsock |
10038 |
Same as BSD |
Wsaedestaddrreq |
Edestaddrreq |
10039 |
Same as BSD |
Wsaemsgsize |
Emsgsize |
10040 |
Same as BSD |
Wsaeprototype |
Eprototype |
10041 |
Same as BSD |
Wsaenoprotoopt |
Enoprotoopt |
10042 |
Same as BSD |
Wsaeprotonosupport |
Eprotonosupport |
10043 |
Same as BSD |
Wsaesocktnosupport |
Esocktnosupport |
10044 |
Same as BSD |
Wsaeopnotsupp |
Eopnotsupp |
10045 |
Same as BSD |
Wsaepfnosupport |
Epfnosupport |
10046 |
Same as BSD |
Wsaeafnosupport |
Eafnosupport |
10047 |
Same as BSD |
Wsaeaddrinuse |
Eaddrinuse |
10048 |
Same as BSD |
Wsaeaddrnotavail |
Eaddrnotavail |
10049 |
Same as BSD |
Wsaenetdown |
Enetdown |
10050 |
Same as BSD. At any time, as long as the Windows Sockets implementation detects that the network subsystem fails, it reports this error. |
Wsaenetunreach |
Enetunreach |
10051 |
Same as BSD |
Wsaenetreset |
Enetreset |
10052 |
Same as BSD |
Wsaeconnaborted |
Econnaborted |
10053 |
Same as BSD |
Wsaeconnreset |
Econnreset |
10054 |
Same as BSD |
Wsaenobufs |
Enobufs |
10055 |
Same as BSD |
Wsaeisconn |
Eisconn |
10056 |
Same as BSD |
Wsaenotconn |
Enotconn |
10057 |
Same as BSD |
Wsaeshudown |
Eshudown |
10058 |
Same as BSD |
Wsaw.manyrefs |
Etoomanyrefs |
10059 |
Same as BSD |
Wsaetimedout |
Etimedout |
10060 |
Same as BSD |
Wsaeconnrefused |
Econnrefused |
10061 |
Same as BSD |
Wsaeloop |
Eloop |
10062 |
Same as BSD |
Wsaenametoolong |
Enametoolong |
10063 |
Same as BSD |
Wsaehostdown |
Ehostdown |
10064 |
Same as BSD |
Wsaehostunreach |
Ehostunreach |
10065 |
Same as BSD |
Wsasysnotready |
|
10091 |
Returned by wsastartup () indicates that the network subsystem is unavailable. |
Wsavernotsupported |
|
10092 |
Returned by wsastartup (), indicating Windows Sockets DLL does not support this application. |
Wsanotinitialised |
|
10093 |
It is returned by other functions except wsastartup (), indicating that no successful wsastartup () call has been executed. |
Wsaediscon |
|
10101 |
Returned by wsarecv () and wsarecvfrom () indicates that the remote party has initialized an "elegant" shutdown sequence. |
Wsahost_not_found |
Host_not_found |
11001 |
Same as BSD |
Wsatry_again |
Try_again |
11002 |
Same as BSD |
Wsano_recovery |
No_recovery |
11003 |
Same as BSD |
Wsano_data |
No_data |
11004 |
Same as BSD |
3.
Several different interpretations of WinSock error number: 10053 wsaeconnaborted
Partial excerpt:
Berkeley description: A connection abort was caused internal to your host machine. The software caused a connection abort because there is no space on the socket's queue and the socket cannot receive further connections.
Winsock description: Partly the same as Berkeley. The error can occur when the local network system aborts a connection. This wowould occur if Winsock aborts an established connection after data retransmission fails (handler never acknowledges data
Sent on a datastream socket ).
TCP/IP scenario: A connection will timeout if the local system doesn't receive an (ACK) nowledgement for data sent. it wocould also timeout if a (FIN) ish TCP packet is not ack 'd (and even if the fin is ack 'd, it will eventually timeout if a fin is not
Returned ).