Skip to content

Instantly share code, notes, and snippets.

@ppelleti
Created February 8, 2013 01:30
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ppelleti/4735862 to your computer and use it in GitHub Desktop.
Save ppelleti/4735862 to your computer and use it in GitHub Desktop.
A comparison of the error strings returned by evutil_socket_error_to_string, versus the error strings returned by the Windows function FormatMessage.
WSAEINTR -> "Interrupted function call [WSAEINTR ]"
WSAEACCES -> "Permission denied [WSAEACCES ]"
WSAEFAULT -> "Bad address [WSAEFAULT ]"
WSAEINVAL -> "Invalid argument [WSAEINVAL ]"
WSAEMFILE -> "Too many open files [WSAEMFILE ]"
WSAEWOULDBLOCK -> "Resource temporarily unavailable [WSAEWOULDBLOCK ]"
WSAEINPROGRESS -> "Operation now in progress [WSAEINPROGRESS ]"
WSAEALREADY -> "Operation already in progress [WSAEALREADY ]"
WSAENOTSOCK -> "Socket operation on nonsocket [WSAENOTSOCK ]"
WSAEDESTADDRREQ -> "Destination address required [WSAEDESTADDRREQ ]"
WSAEMSGSIZE -> "Message too long [WSAEMSGSIZE ]"
WSAEPROTOTYPE -> "Protocol wrong for socket [WSAEPROTOTYPE ]"
WSAENOPROTOOPT -> "Bad protocol option [WSAENOPROTOOPT ]"
WSAEPROTONOSUPPORT -> "Protocol not supported [WSAEPROTONOSUPPORT ]"
WSAESOCKTNOSUPPORT -> "Socket type not supported [WSAESOCKTNOSUPPORT ]"
WSAEOPNOTSUPP -> "Operation not supported [WSAEOPNOTSUPP ]"
WSAEPFNOSUPPORT -> "Protocol family not supported [WSAEPFNOSUPPORT ]"
WSAEAFNOSUPPORT -> "Address family not supported by protocol family [WSAEAFNOSUPPORT ]"
WSAEADDRINUSE -> "Address already in use [WSAEADDRINUSE ]"
WSAEADDRNOTAVAIL -> "Cannot assign requested address [WSAEADDRNOTAVAIL ]"
WSAENETDOWN -> "Network is down [WSAENETDOWN ]"
WSAENETUNREACH -> "Network is unreachable [WSAENETUNREACH ]"
WSAENETRESET -> "Network dropped connection on reset [WSAENETRESET ]"
WSAECONNABORTED -> "Software caused connection abort [WSAECONNABORTED ]"
WSAECONNRESET -> "Connection reset by peer [WSAECONNRESET ]"
WSAENOBUFS -> "No buffer space available [WSAENOBUFS ]"
WSAEISCONN -> "Socket is already connected [WSAEISCONN ]"
WSAENOTCONN -> "Socket is not connected [WSAENOTCONN ]"
WSAESHUTDOWN -> "Cannot send after socket shutdown [WSAESHUTDOWN ]"
WSAETIMEDOUT -> "Connection timed out [WSAETIMEDOUT ]"
WSAECONNREFUSED -> "Connection refused [WSAECONNREFUSED ]"
WSAEHOSTDOWN -> "Host is down [WSAEHOSTDOWN ]"
WSAEHOSTUNREACH -> "No route to host [WSAEHOSTUNREACH ]"
WSAEPROCLIM -> "Too many processes [WSAEPROCLIM ]"
WSASYSNOTREADY -> "Network subsystem is unavailable [WSASYSNOTREADY ]"
WSAVERNOTSUPPORTED -> "Winsock.dll out of range [WSAVERNOTSUPPORTED ]"
WSANOTINITIALISED -> "Successful WSAStartup not yet performed [WSANOTINITIALISED ]"
WSAEDISCON -> "Graceful shutdown now in progress [WSAEDISCON ]"
WSATYPE_NOT_FOUND -> "Class type not found [WSATYPE_NOT_FOUND ]"
WSAHOST_NOT_FOUND -> "Host not found [WSAHOST_NOT_FOUND ]"
WSATRY_AGAIN -> "Nonauthoritative host not found [WSATRY_AGAIN ]"
WSANO_RECOVERY -> "This is a nonrecoverable error [WSANO_RECOVERY ]"
WSANO_DATA -> "Valid name, no data record of requested type) [WSANO_DATA ]"
WSAEINTR -> "A blocking operation was interrupted by a call to WSACancelBlockingCall."
WSAEACCES -> "An attempt was made to access a socket in a way forbidden by its access permissions."
WSAEFAULT -> "The system detected an invalid pointer address in attempting to use a pointer argument in a call."
WSAEINVAL -> "An invalid argument was supplied."
WSAEMFILE -> "Too many open sockets."
WSAEWOULDBLOCK -> "A non-blocking socket operation could not be completed immediately."
WSAEINPROGRESS -> "A blocking operation is currently executing."
WSAEALREADY -> "An operation was attempted on a non-blocking socket that already had an operation in progress."
WSAENOTSOCK -> "An operation was attempted on something that is not a socket."
WSAEDESTADDRREQ -> "A required address was omitted from an operation on a socket."
WSAEMSGSIZE -> "A message sent on a datagram socket was larger than the internal message buffer or some other network limit, or the buffer used to receive a datagram into was smaller than the datagram itself."
WSAEPROTOTYPE -> "A protocol was specified in the socket function call that does not support the semantics of the socket type requested."
WSAENOPROTOOPT -> "An unknown, invalid, or unsupported option or level was specified in a getsockopt or setsockopt call."
WSAEPROTONOSUPPORT -> "The requested protocol has not been configured into the system, or no implementation for it exists."
WSAESOCKTNOSUPPORT -> "The support for the specified socket type does not exist in this address family."
WSAEOPNOTSUPP -> "The attempted operation is not supported for the type of object referenced."
WSAEPFNOSUPPORT -> "The protocol family has not been configured into the system or no implementation for it exists."
WSAEAFNOSUPPORT -> "An address incompatible with the requested protocol was used."
WSAEADDRINUSE -> "Only one usage of each socket address (protocol/network address/port) is normally permitted."
WSAEADDRNOTAVAIL -> "The requested address is not valid in its context."
WSAENETDOWN -> "A socket operation encountered a dead network."
WSAENETUNREACH -> "A socket operation was attempted to an unreachable network."
WSAENETRESET -> "The connection has been broken due to keep-alive activity detecting a failure while the operation was in progress."
WSAECONNABORTED -> "An established connection was aborted by the software in your host machine."
WSAECONNRESET -> "An existing connection was forcibly closed by the remote host."
WSAENOBUFS -> "An operation on a socket could not be performed because the system lacked sufficient buffer space or because a queue was full."
WSAEISCONN -> "A connect request was made on an already connected socket."
WSAENOTCONN -> "A request to send or receive data was disallowed because the socket is not connected and (when sending on a datagram socket using a sendto call) no address was supplied."
WSAESHUTDOWN -> "A request to send or receive data was disallowed because the socket had already been shut down in that direction with a previous shutdown call."
WSAETIMEDOUT -> "A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond."
WSAECONNREFUSED -> "No connection could be made because the target machine actively refused it."
WSAEHOSTDOWN -> "A socket operation failed because the destination host was down."
WSAEHOSTUNREACH -> "A socket operation was attempted to an unreachable host."
WSAEPROCLIM -> "A Windows Sockets implementation may have a limit on the number of applications that may use it simultaneously."
WSASYSNOTREADY -> "WSAStartup cannot function at this time because the underlying system it uses to provide network services is currently unavailable."
WSAVERNOTSUPPORTED -> "The Windows Sockets version requested is not supported."
WSANOTINITIALISED -> "Either the application has not called WSAStartup, or WSAStartup failed."
WSAEDISCON -> "Returned by WSARecv or WSARecvFrom to indicate the remote party has initiated a graceful shutdown sequence."
WSATYPE_NOT_FOUND -> "The specified class was not found."
WSAHOST_NOT_FOUND -> "No such host is known."
WSATRY_AGAIN -> "This is usually a temporary error during hostname resolution and means that the local server did not receive a response from an authoritative server."
WSANO_RECOVERY -> "A non-recoverable error occurred during a database lookup."
WSANO_DATA -> "The requested name is valid, but no data of the requested type was found."
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment