开发者

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.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜