CAsyncSocket的send返回10035异常时,数据会丢失吗
展开全部
CAsyncSocket会将socket设置为非阻塞的,所以send返回10035是正常的,看msdn上说的:
This error is returned from operations on nonblocking sockets that cannot be completed immediately, for example recv when no data is queued to be read from the socket. It is a nonfatal error, and the operation should be retried later. It is normal for WSAEWOULDBLOCK to be reported as the result from calling connect on a nonblocking SOCK_STREAM socket, since some time must elapse for the connection to be established.
你应该在FD_WRITE这里继续进行send操作,同时要记住之前发送了多少。
This error is returned from operations on nonblocking sockets that cannot be completed immediately, for example recv when no data is queued to be read from the socket. It is a nonfatal error, and the operation should be retried later. It is normal for WSAEWOULDBLOCK to be reported as the result from calling connect on a nonblocking SOCK_STREAM socket, since some time must elapse for the connection to be established.
你应该在FD_WRITE这里继续进行send操作,同时要记住之前发送了多少。
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询