开发者

Check number of connections in the queue of a server socket in Java

I have a Java program that creates a server socket and accepts connections from various clients.

I am interested in finding out the number of connections that are in queue (waiting to be processed by the server). I have used the default constructor without specifying the backlog parameter.

At runtime, is it 开发者_如何学JAVApossible to know how many connections are pending for the server?

I want to implement a monitor process, which will check how full the queue is and based on that, trigger clone processes for load balancing (so that the connections are not dropped).


According to this SO answer, you can't.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜