WinSock select() 监听套接字,非阻塞 I/O?

标签 winsock

当我在 Windows 上的 listen() 套接字上执行 select() 时,它是非阻塞的。当有连接待处理时,我是否会收到读取事件或写入事件?

最佳答案

阅读。

来自MSDN :

The parameter readfds identifies the sockets that are to be checked for readability. If the socket is currently in the listen state, it will be marked as readable if an incoming connection request has been received such that an accept is guaranteed to complete without blocking.

关于WinSock select() 监听套接字,非阻塞 I/O?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/4579449/

相关文章:

c - ntdll.dll 中的 Winsock getaddrinfo 未处理的异常/崩溃

c++ - 连接到服务器时 WSACONNREFUSED

java - 客户端和服务器套接字之间交换的 "messages"结尾

c++ - 在服务器应用程序的情况下,分离线程被认为是好的、中性的还是糟糕的设计

udp - Winsock 错误 10054 (WSAECONNRESET) "normal"与 UDP 到/来自本地主机吗?

c++ - Socket发送数据但收不到响应

C 网络编程 - Winsock

c++ - 使用 Winsock 的简单 HTTP 获取

https - 为什么这个 SSL_pending 调用总是返回零?

c++ - 无法连接到端口,但 netstat 显示正在监听的端口