by hdetter » 28 Apr 2008, 12:46
The thing I want to achieve is: The server must not accept a new connection as long as it serves the one and only connection from a connected client. It must not matter, from where the client connection originates. The server must refuse any new connection, if one client is connected.
As written, I took the timeserver having the TCPServerParams set and the run() method of TimeServerConnection is looping and printing timestamps. From localhost I start telnet, connect to the server and get the timestamps printed in the telnet console, then I let it run and connect to server using another telnet session. And again I let me connect and also will printout timestamps. The same happens with a third telnet client connection. So in total I have three client and all get data from the server. But what I want is, that I can only establish the one and only connection. If this one and only connection gets closed, a new client connection should succeed.
Thanks!
Hans