src code

instance method Client#onClose

Client#onClose() → undefined

Event handler that is called after an invokation to Client#close has been called, resulting in a socket being closed. That is, if you call Client#close on an instance that is already closed, then this event will not be called. Perhaps more importantly, this event will be called if the server closes the connection (either directly through code or otherwise). You must implement this function in a subclass to be useful.