notify the client when its connection is discarded
add a hook called when a connection is closed
add a response handler for each request