Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
当这些错误发生在connect()(非阻塞)时如何响应?我想知道我是否应该杀死这个套接字并创建一个新的,或者我可以等待一段时间然后用现有的套接字再试一次,一切都会奏效(如果远程主机在线)?
connect()
在这些情况下,您可以尝试再次连接,因为再次创建和绑定套接字将是不必要的额外工作。