Allows to set a handler that will be called when a connection is about being closed.
This method could be used to establish some especial actions to be taken before the connection is completely unrefered. Keep in mind that this function is executed only once a a connection is broken.
This handler is used by:
NOTE: You must not free the connection received at the handler. This is actually done by the library.
|connection ||The connection that is about to be unrefered. |