SOCKET 异常类型

Error code

Meaning

WSAECONNABORTED

The virtual circuit was terminated due to a time-out or other failure.
由于超时或其他错误导致虚电路中止。

WSAECONNRESET

For a stream socket, the virtual circuit was reset by the remote side. The application should close the socket as it is no longer usable. For a UDP datagram socket, this error would indicate that a previous send operation resulted in an ICMP "Port Unreachable" message.
虚电路被远端复位。

WSAEDISCON

Socket s is message oriented and the virtual circuit was gracefully closed by the remote side.
远端优雅的结束了连接。

WSAEFAULT

The lpBuffers parameter is not completely contained in a valid part of the user address space.

WSAEINPROGRESS

A blocking Windows Sockets 1.1 call is in progress, or the service provider is still processing a callback function.
一个阻塞的WinSock调用正在进行中,或者服务提供者仍在处理一个回调函数

WSAEINTR


The (blocking) call was canceled by the WSACancelBlockingCall function.
通过WSACancelBlockingCall()函数取消(阻塞)调用。

WSAEINVAL

The socket has not been bound (for example, with bind).
套接口未用bind()捆绑,或者套接口未用重叠标志创建。

WSAEMSGSIZE

The message was too large to fit into the specified buffer and (for unreliable protocols only) any trailing portion of the message that did not fit into the buffer has been discarded.

WSAENETDOWN


The network subsystem has failed.
网络子系统失效。

WSAENETRESET

For a connection-oriented socket, this error indicates that the connection has been broken due to keep-alive activity detecting a failure while the operation was in progress. For a datagram socket, this error indicates that the time to live has expired.
由于远端的复位造成连接的中止。

WSAENOTCONN


The socket is not connected.
套接口未连接。

WSAENOTSOCK

The descriptor is not a socket.
描述字不是一个套接口。

WSAEOPNOTSUPP

MSG_OOB was specified, but the socket is not stream-style such as type SOCK_STREAM, OOB data is not supported in the communication domain associated with this socket, or the socket is unidirectional and supports only send operations.
设置了MSG_OOB,但是该套接口不是诸如SOCK_STREAM流类型的,与套接口相关的通讯域不支持带外数据,或者套接口是单向的,只支持发送操作。

WSAESHUTDOWN

The socket has been shut down; it is not possible to call WSARecv on a socket after shutdown has been invoked with howset to SD_RECEIVE or SD_BOTH.
套接口已经关闭;一个套接口以SD_RECEIVE或 SD_BOTH的how参数shutdown()后,无法进行WSARecv()调用。

WSAETIMEDOUT

The connection has been dropped because of a network failure or because the peer system failed to respond.

WSAEWOULDBLOCK

 

Windows NT:  
Overlapped sockets: there are too many outstanding overlapped I/O requests. Nonoverlapped sockets: The socket is marked as nonblocking and the receive operation cannot be completed immediately. 
重叠套接口:太多重叠的输入/输出请求。非重叠套接口:套接口被标志为非阻塞,但是操作不能立即完成。

WSANOTINITIALISED


A successful WSAStartup call must occur before using this function.
在调用本API之前应成功调用WSAStartup()。

WSA_IO_PENDING

An overlapped operation was successfully initiated and completion will be indicated at a later time.
成功启动一个重叠操作,过后将有完成指示。

WSA_OPERATION_ABORTED

The overlapped operation has been canceled due to the closure of the socket.

你可能感兴趣的:(windows,socket)