Winsock Error Codes

The Windows Sockets API (Winsock) provides a set of functions for network communication. When these functions encounter errors, they return specific error codes that can help diagnose and resolve issues. This page lists and describes the common Winsock error codes.

Common Winsock Error Codes

These error codes are returned by Winsock functions to indicate specific network-related problems.

Error Code Symbolic Name Description
10004 WSAEINTR A blocking operation was interrupted by a call to WSACancelBlockingCall.
10013 WSAEACCES An attempt was made to access a socket in a way forbidden by its access permissions.
10014 WSAEDESTADDRREQ A destination address was required but was omitted.
10015 WSAEOPNOTSUPP An attempt was made to operate on something that this is not supported.
10016 WSAEPRO_ERROR A system call shich the service depends on failed.
10017 WSAEPROTOTYP An operation was attempted on a protocol type not supported or known.
10018 WSAEPROTONOSUPPORT A protocol is not supported by the Windows Sockets implementation.
10019 WSAESOCKNOSUPPORT The kind of socket requested is not supported by this particular protocol family.
10020 WSAEPROTONOTSUPPORT The requested protocol is not supported by the Windows Sockets implementation.
10021 WSAEPROCLIM A WinSock implementation has exceeded its configured limit for per-process or system-wide, concurrently open sockets.
10022 WSAEOPNOTSUPP An attempt was made to operate on something that is not supported.
10024 WSAEPFNOSUPPORT The specified procedure is not supported by this protocol family.
10025 WSAEPFNOSUPPORT The specified procedure is not supported by this protocol family.
10026 WSAESOCKSHUTDOWN A socket that is not connected has been selected for a connection attempt.
10035 WSAEWOULDBLOCK A non-blocking socket operation could not be completed immediately.
10036 WSAEINPROGRESS A blocking Winsock operation is in progress.
10037 WSAEALREADY A non-blocking socket is already connected.
10038 WSAENOTSOCK An operation was attempted on something that is not a socket.
10039 WSAEDESTADDRREQ A destination address was required but was omitted.
10040 WSAEMSGSIZE A message is too long to be sent.
10041 WSAEPROTOOPT A protocol-specific error occurred.
10042 WSAEPFNOSUPPORT A specified protocol family or protocol is not supported.
10043 WSAEAFNOSUPPORT A specified address family is not supported.
10044 WSAEPROTOTYP A specified protocol is not supported for the specified address family.
10045 WSAESOCKTNOSUPPORT The requested socket type is not supported.
10046 WSAEOPNOTSUPP The attempted operation is not supported for the type of object referenced.
10047 WSAEADDRINUSE A specified address is already in use.
10048 WSAEADDRNOTAVAIL A requested address is not valid in its context.
10049 WSAENETDOWN A socket operation encountered a dead network.
10050 WSAENETUNREACH A socket operation tried to use an unreachable network.
10051 WSAENETRESET A socket operation reset the network.
10052 WSAECONNABORTED A connection has been aborted due to a network reset or a failure in the remote host.
10053 WSAECONNRESET A connection has been reset by the peer.
10054 WSAENOTCONN A socket is not connected.
10055 WSAETIMEOUT A connection attempt timed out without establishing a connection.
10056 WSAECONNREFUSED A connection attempt was refused by the remote host.
10057 WSAELOOP A loopback connection is not allowed.
10058 WSAENAMETOOLONG A name was too long to be included in the necessary system structures.
10059 WSAENOTEMPTY A network (or related name space) was disconnected.
10060 WSAEDISCON A connection was gracefully closed by the remote host.
10061 WSAEREMOTEHOSTCLOSED The connection was reset by the remote host.
10062 WSAENETRESET A network connection was aborted because the protocol could not be satisfied.
10063 WSAENETUNREACH A socket operation tried to use an unreachable network.
10064 WSAENETDOWN A socket operation encountered a dead network.
10065 WSAEHOST_NOT_FOUND The requested name is valid, but no data of the requested type was found.
10066 WSAEPROTOTYP A protocol specified in the requested combination of address family, socket type, and protocol is not supported.
10067 WSAEPROCLIM A system call invoked by a service that a Winsock implementation depends on failed.
10068 WSAEUSERS Too many users, or too many connections.
10069 WSAEDQUOT The quota for a user or group has been exceeded.
10070 WSAESTALE A file handle is no longer valid.
10071 WSAEREMOTE This object may be a remote file system.
10072 WSAELOOP Too many levels of symbolic links.
10073 WSAENAMETOOLONG A name or reference to a file that is too long.
10074 WSAEHOST_DOWN A name resolution service is not known.
10075 WSAENETDOWN A network subsystem has failed.
10076 WSAENETUNREACH A socket operation tried to use an unreachable network.
10077 WSAENETRESET A connection has been broken because of keep-alive activity.
10078 WSAECONNABORTED A connection has been aborted because of an intermittent network problem.
10079 WSAECONNRESET A connection has been reset by the peer.
10080 WSAENOTCONN A socket is not connected.
10081 WSAETIMEOUT A connection attempt timed out without establishing a connection.
10082 WSAECONNREFUSED A connection attempt was refused by the remote host.
10083 WSAELOOP A loopback connection is not allowed.
10084 WSAENAMETOOLONG A name was too long to be included in the necessary system structures.
10085 WSAENOTEMPTY A network (or related name space) was disconnected.
10086 WSAEDISCON A connection was gracefully closed by the remote host.
10087 WSAEREMOTEHOSTCLOSED The connection was reset by the remote host.
10088 WSAENETRESET A network connection was aborted because the protocol could not be satisfied.
10089 WSAENETUNREACH A socket operation tried to use an unreachable network.
10090 WSAENETDOWN A socket operation encountered a dead network.
10091 WSAEHOST_NOT_FOUND The requested name is valid, but no data of the requested type was found.
10092 WSAEPROTOTYP A protocol specified in the requested combination of address family, socket type, and protocol is not supported.
10093 WSAEPROCLIM A system call invoked by a service that a Winsock implementation depends on failed.
10094 WSAEUSERS Too many users, or too many connections.
10095 WSAEDQUOT The quota for a user or group has been exceeded.
10096 WSAESTALE A file handle is no longer valid.
10097 WSAEREMOTE This object may be a remote file system.
10098 WSAELOOP Too many levels of symbolic links.
10099 WSAENAMETOOLONG A name or reference to a file that is too long.
10100 WSAEHOST_DOWN A name resolution service is not known.
10101 WSAENETDOWN A network subsystem has failed.
10102 WSAENETUNREACH A socket operation tried to use an unreachable network.
10103 WSAENETRESET A connection has been broken because of keep-alive activity.
10104 WSAECONNABORTED A connection has been aborted because of an intermittent network problem.
10105 WSAECONNRESET A connection has been reset by the peer.
10106 WSAENOTCONN A socket is not connected.
10107 WSAETIMEOUT A connection attempt timed out without establishing a connection.
10108 WSAECONNREFUSED A connection attempt was refused by the remote host.
10109 WSAELOOP A loopback connection is not allowed.
10110 WSAENAMETOOLONG A name was too long to be included in the necessary system structures.
10111 WSAENOTEMPTY A network (or related name space) was disconnected.
10112 WSAEDISCON A connection was gracefully closed by the remote host.
10113 WSAEREMOTEHOSTCLOSED The connection was reset by the remote host.
10114 WSAENETRESET A network connection was aborted because the protocol could not be satisfied.
10115 WSAENETUNREACH A socket operation tried to use an unreachable network.
10116 WSAENETDOWN A socket operation encountered a dead network.
10117 WSAEHOST_NOT_FOUND The requested name is valid, but no data of the requested type was found.
10118 WSAEPROTOTYP A protocol specified in the requested combination of address family, socket type, and protocol is not supported.
10119 WSAEPROCLIM A system call invoked by a service that a Winsock implementation depends on failed.
10120 WSAEUSERS Too many users, or too many connections.
10121 WSAEDQUOT The quota for a user or group has been exceeded.
10122 WSAESTALE A file handle is no longer valid.
10123 WSAEREMOTE This object may be a remote file system.
10124 WSAELOOP Too many levels of symbolic links.
10125 WSAENAMETOOLONG A name or reference to a file that is too long.
10126 WSAEHOST_DOWN A name resolution service is not known.
10127 WSAENETDOWN A network subsystem has failed.
10128 WSAENETUNREACH A socket operation tried to use an unreachable network.
10129 WSAENETRESET A connection has been broken because of keep-alive activity.
10130 WSAECONNABORTED A connection has been aborted because of an intermittent network problem.
10131 WSAECONNRESET A connection has been reset by the peer.
10132 WSAENOTCONN A socket is not connected.
10133 WSAETIMEOUT A connection attempt timed out without establishing a connection.
10134 WSAECONNREFUSED A connection attempt was refused by the remote host.
10135 WSAELOOP A loopback connection is not allowed.
10136 WSAENAMETOOLONG A name was too long to be included in the necessary system structures.
10137 WSAENOTEMPTY A network (or related name space) was disconnected.
10138 WSAEDISCON A connection was gracefully closed by the remote host.
10139 WSAEREMOTEHOSTCLOSED The connection was reset by the remote host.
10140 WSAENETRESET A network connection was aborted because the protocol could not be satisfied.
10141 WSAENETUNREACH A socket operation tried to use an unreachable network.
10142 WSAENETDOWN A socket operation encountered a dead network.
10143 WSAEHOST_NOT_FOUND The requested name is valid, but no data of the requested type was found.
10144 WSAEPROTOTYP A protocol specified in the requested combination of address family, socket type, and protocol is not supported.
10145 WSAEPROCLIM A system call invoked by a service that a Winsock implementation depends on failed.
10146 WSAEUSERS Too many users, or too many connections.
10147 WSAEDQUOT The quota for a user or group has been exceeded.
10148 WSAESTALE A file handle is no longer valid.
10149 WSAEREMOTE This object may be a remote file system.
10150 WSAELOOP Too many levels of symbolic links.
10151 WSAENAMETOOLONG A name or reference to a file that is too long.
10152 WSAEHOST_DOWN A name resolution service is not known.

More Information

For a comprehensive list and detailed explanations, please refer to the official Microsoft documentation:

Windows Sockets error codes (Winsock)