Size of a java ServerSocket queue
Can we get the state (free space) of a java ServerSocket
queue ??
The goal is to throw an exception when it's full ...
Some details about the ServerSocket
queue :
Class ServerSocket
...
ServerSocket()
...
The maximum queue length for incoming connection indications (a request to connect) is set to 50. If a connection indication arrives when the queue is full, the connection is refused.
...
ServerSocket(int port, int backlog)
...
T开发者_如何转开发he maximum queue length for incoming connection indications (a request to connect) is set to the backlog parameter. If a connection indication arrives when the queue is full, the connection is refused.
No, the queue is managed by the OS, out of the SDK's purview.
精彩评论