I'm using client-server mechanism inside my app to transport internal data.
One of server parts should be designed to serve one request at time, no threads, no backlogs. I found weird functionality then using:
serverport = new ServerSocket(port, 1, InetAddress.getLoopbackAddress());
This one continue to receive incoming connection even after one is already backlogged?
Any suggestions how it's possible, and how may I workaround the issue?
As it says in the Javadoc:
The backlog argument is the requested maximum number of pending connections on the socket. Its exact semantics are implementation specific. In particular, an implementation may impose a maximum length or may choose to ignore the parameter altogther. The value provided should be greater than 0. If it is less than or equal to 0, then an implementation specific default will be used.