Top  Previous  Next











No reply        


Response (immediate socket)


No reply




Kills all line events, kills all timers, releases all lines and closes the network connection(s). There may be a short delay (< 1 s) before the network connection is closed.


This command should be issued when the client has finished. It releases ownership of the lines under the client's control, so another client can use them. If you close the network connection without this, the server will notice and clean up. However, if the client crashes, leaving the network connection open, there may be a considerable delay before the server notices.


The problem of crashed clients


Obviously, I could have programmed the system so the server regularly checked that its clients were OK, and killed all links to unresponsive clients. However, I don't agree with this philosophy; the client might be busy doing other things. The solution I went for is this: The server keeps track of the time of the last communication received from the client. The operator (you!) can also ask the server to 'ping' all its clients. The server sends a Ping message to the client(s), and a well-written client will respond with an acknowledgement. As this constitutes communication, this will reset the 'time since last communication' clock. This clock is displayed on the server's console (it's in the main client list). In addition, if the server tries to send a message to the client and the network link actually fails (which often happens with a dead client), the message 'ERROR SENDING TO CLIENT' will be recorded indelibly in that client's status information.


So, if you think your client is dead, have a look at its clock. If it hasn't responded for a while, you can ping it using the server's console. If it responds, its clock will be reset to zero. If it doesn't respond, and you know the client is programmed to respond to Ping events, or if the network error message has appeared, the client may well be dead. You can then delete it from the server's list and free up its resources. However, it's your job to decide whether that client is really dead, and not just too busy doing something else to respond to ping messages.


If you're living life on the edge and the client is on a different computer to the server, you must also bear in mind the possibility that the network is down (rather than the client).        


Revision history


Implemented in WhiskerServer version 1.