阅读背景:

套接字上的“连接”调用可以成功返回而无需服务器调用“accept”吗?

来源:互联网 

Server has created a socket and bound to a port and started a thread which is in loop to accept the connection. Sometime later loop exited due to an exception resulting in thread exit but socket is still bounded to port. Now if client does a 'connect' to this server, it is succeeding. How is it possible? If I understand correctly, 'connect' returns only after server does 'accept' on the listening socket. Am I missing something here?Server has created a socket and bound to a port




你的当前访问异常,请进行认证后继续阅读剩余内容。

分享到: