Winsock error code

本文列举了Winsock错误代码及其含义,这些错误代码由WSAGetLastError函数返回,用于报告和标识由其他Winsock函数引发的错误。从WSAEINTR到WSAEPROTONOSUPPORT,每个错误代码都对应一种特定的操作失败情况。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

winsock2 WsaGetLastError

The following list identifies the Winsock error codes. These values are used by the WSAGetLastError function to report and identify errors caused by other Winsock functions.

The following Winsock error codes are listed in ascending numerical order.

WSAEINTR (10004)
Interrupted Function Call -- A blocking operation was cancelled.

WSAEACCESS (10013)
Permission Denied -- An attempt to access a socket was forbidden by its access permissions.

WSAEFAULT (10014)
Bad Address -- An invalid pointer address was specified in a function call.

WSAEINVAL (10022)
Invalid Argument -- An invalid argument was passed to a function.

WSAEMFILE (10024)
Too Many Open Files -- There are too many open sockets.

WSAEWOULDBLOCK (10035)
Resource Temporarily Unavailable -- The specified socket operation cannot be completed immediately, but the operation should be retried later.

WSAEINPROGRESS (10036)
Operation Now in Progress -- A blocking operation is currently executing.

WSAEALREADY (10037)
Operation Already in Progress -- An operation was attempted on a non-binding socket that already had an operation in progress.

WSAENOTSOCK (10038)
Socket Operation on Non-Socket -- An operation was attempted on something that is not a socket.

WSAEDESTADDRREQ (10039)
Destination Address Required -- A required address was omitted from a socket operation.

WSAEMSGSIZE (10040)
Message Too Long -- A message was sent on a datagram socket that exceeds the internal message buffer or some other limit.

WSAEPROTOTYPE (10041)
Protocol Wrong Type for Socket -- A protocol was specified that is not supported by the target socket.

WSAENOPROTOOPT (10042)
Bad Protocol Option -- An unknown, invalid, or unsupported protocol option or leel was specified.

WSAEPROTONOSUPPORT (10043)
Protocol Not Supported -- The specified protocol is not supported or is not implemented.

转载于:https://www.cnblogs.com/feisimple/archive/2006/06/19/429423.html

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值