gpt4 book ai didi

WinSock select() on listen()ing 套接字,非阻塞 I/O?

转载 作者:行者123 更新时间:2023-12-04 06:38:27 24 4
gpt4 key购买 nike

当我做 select()listen()在 Windows 上使用套接字并且它是非阻塞的。当连接挂起时,我是否会收到读取事件或写入事件?

最佳答案

读。

来自 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() on listen()ing 套接字,非阻塞 I/O?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/4579449/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com