C#socket.Receive方法socketError10035 WouldBlock处理
在服务器端为NIO时候,实现长连接,c#为客户端时候,循环调用socket.Receive(循环读取等待服务端消息),会出现 ErrorCode: 0x00002733(10035 WouldBlock )无法立即完成一个非阻止性套接字操作.(A non-blocking socket operation could not be completed immediately.) ,之后设置 socketc.Blocking = true; ,仍然没用,没办法,只能查阅MSDN,终于找到了一段话:...
原创
2021-04-29 17:15:34 ·
2141 阅读 ·
0 评论