阅读背景:

在接受的套接字上调用close()之前,Java ServerSocket将不接受新连接

来源:互联网 

In my code (below) the the serverSocket won't accept a new connection until a thread deals with the existing connection and calls close() on the socket that serverSocket.accept() created. If i start this server and open two tabs in the browser then only one of the tabs connects and the other is left waiting until the other tab finishes (which it doesn't) before serverSocket.accept() will accept a new connection. How can i accept a new connection without closing the previous one?In my code (below) the the serverSocket won't a




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

分享到: