2

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 possible 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).

Nileema
  • 58
  • 5

1 Answers1

1

According to this SO answer, you can't.

Community
  • 1
  • 1
no.good.at.coding
  • 20,221
  • 2
  • 60
  • 51