winsock
Windows Sockets (Winsock) Error Codes
Error codes returned by the Windows Sockets API (Winsock2), retrieved via WSAGetLastError(). Distinct from generic Win32 system error codes and from the CRT errno values, these are the codes actually surfaced by socket operations (connect, send, recv, bind) on Windows.
53 codes
· All codes 53 codes
- WSAEACCES Permission denied An attempt was made to access a socket in a way forbidden by its access permissions, such as broadcasting on a socket not configured for it.
- WSAEADDRINUSE Address already in use A bind attempt was made on a socket address (port and/or local address) already in use, typically without SO_REUSEADDR set.
- WSAEADDRNOTAVAIL Cannot assign requested address The requested address is not valid in its context, such as binding to an address that is not the local machine.
- WSAEAFNOSUPPORT Address family not supported by protocol family An address incompatible with the requested protocol was used, e.g. an IPv6 address to a socket created with AF_INET.
- WSAEALREADY Operation already in progress An operation was attempted on a non-blocking socket that already had an operation in progress.
- WSAEBADF Bad file descriptor The file handle supplied is not valid.
- WSAECANCELLED Call has been cancelled A call to WSALookupServiceEnd was made while a call to WSALookupServiceNext was still processing, cancelling the call.
- WSAECONNABORTED Software caused connection abort An established connection was aborted by the local system's software, likely due to a data transmission time-out or protocol error.
- WSAECONNREFUSED Connection refused No connection could be made because the target machine actively refused it, typically because no process is listening on the remote port.
- WSAECONNRESET Connection reset by peer An existing connection was forcibly closed by the remote host, often when the remote application exits abnormally.
- WSAEDESTADDRREQ Destination address required A required address was omitted from an operation on a socket, such as sendto without a valid destination address.
- WSAEDISCON Graceful shutdown in progress Returned by WSARecv or WSARecvFrom to indicate the remote party has initiated a graceful shutdown sequence.
- WSAEDQUOT Disk quota exceeded The user's disk quota has been exceeded.
- WSAEFAULT Bad address The system detected an invalid pointer address in attempting to use a pointer argument in a call.
- WSAEHOSTDOWN Host is down A socket operation failed because the destination host was down.
- WSAEHOSTUNREACH No route to host A socket operation was attempted to an unreachable host.
- WSAEINPROGRESS Operation now in progress A blocking operation is currently executing; Windows Sockets only allows one blocking operation per task or thread.
- WSAEINTR Interrupted function call A blocking operation was interrupted by a call to WSACancelBlockingCall.
- WSAEINVAL Invalid argument An invalid argument was supplied, such as calling bind before setting an address family, or setsockopt with an invalid level.
- WSAEISCONN Socket is already connected A connect request was made on an already-connected socket, or a sendto was issued on a connected datagram socket.
- WSAELOOP Cannot translate name A path name lookup involved too many symbolic links, or the name could not be translated.
- WSAEMFILE Too many open files Too many open sockets; each implementation may have a maximum number of socket handles available.
- WSAEMSGSIZE Message too long A message sent on a datagram socket was larger than the internal message buffer or some other network limit.
- WSAENAMETOOLONG Name too long A name component or a name was too long.
- WSAENETDOWN Network is down A socket operation encountered a dead network, usually indicating a serious network subsystem failure.
- WSAENETRESET Network dropped connection on reset The connection was broken due to the keep-alive activity detecting a failure while the operation was in progress.
- WSAENETUNREACH Network is unreachable A socket operation was attempted to an unreachable network, often caused by a local routing table entry.
- WSAENOBUFS No buffer space available An operation on a socket could not be performed because the system lacked sufficient buffer space or a queue was full.
- WSAENOMORE No more results No more results can be returned by WSALookupServiceNext.
- WSAENOPROTOOPT Bad protocol option An unknown, invalid, or unsupported option or level was specified in a getsockopt or setsockopt call.
- WSAENOTCONN Socket is not connected A send or receive request was made on a socket that is not connected, and no address was supplied.
- WSAENOTEMPTY Directory not empty A directory could not be deleted because it was not empty.
- WSAENOTSOCK Socket operation on nonsocket An operation was attempted on something that is not a socket, often because the descriptor is invalid or already closed.
- WSAEOPNOTSUPP Operation not supported The attempted operation is not supported for the type of object referenced, e.g. accept on a datagram socket.
- WSAEPFNOSUPPORT Protocol family not supported The protocol family has not been configured into the system or no implementation for it exists.
- WSAEPROCLIM Too many processes A Windows Sockets implementation may have a limit on the number of applications that can use it simultaneously.
- WSAEPROTONOSUPPORT Protocol not supported The requested protocol has not been configured into the system, or no implementation for it exists.
- WSAEPROTOTYPE Protocol wrong type for socket A protocol was specified that does not support the semantics of the socket type requested, e.g. SOCK_STREAM with UDP.
- WSAEREMOTE Item is remote The item is not available locally; the operation would require access to a remote resource that is unavailable.
- WSAESHUTDOWN Cannot send after socket shutdown A send request, or a call to setsockopt, was made after the socket had been shut down for that direction with a previous shutdown call.
- WSAESOCKTNOSUPPORT Socket type not supported The support for the specified socket type does not exist in this address family.
- WSAESTALE Stale file handle reference The file handle reference is no longer available, usually because the underlying file system object has been removed.
- WSAETIMEDOUT Connection timed out A connection attempt failed because the connected party did not properly respond after a period of time.
- WSAETOOMANYREFS Too many references Too many references to some kernel object; the associated queue of the transport endpoint has too many references.
- WSAEUSERS User quota exceeded The user's quota of resources has been exceeded.
- WSAEWOULDBLOCK Resource temporarily unavailable A non-blocking socket operation could not be completed immediately, e.g. connect on a non-blocking socket.
- WSAHOST_NOT_FOUND Host not found No such host is known; the authoritative name server (or equivalent) reported no such host.
- WSANO_DATA Valid name, no data record of requested type The requested name is valid and was found in the database, but does not have the correct associated data being resolved for.
- WSANO_RECOVERY Nonrecoverable error An unexpected, nonrecoverable error occurred during a database lookup, e.g. a name server returned a malformed response.
- WSANOTINITIALISED Successful WSAStartup not yet performed Either the application has not called WSAStartup, or WSAStartup failed, before a Windows Sockets call was made.
- WSASYSNOTREADY Network subsystem is unavailable Returned by WSAStartup if the underlying network subsystem is not ready for network communication.
- WSATRY_AGAIN Nonauthoritative host not found A temporary error occurred on an authoritative name server; a retry at some later time may succeed.
- WSAVERNOTSUPPORTED Winsock.dll version out of range Returned by WSAStartup when the version of Windows Sockets support requested is not provided by this particular Winsock implementation.