void set_close_callback(function(void|mixed:void) close)
Install a function to be called when the connection is closed.
It will only be called if the connection is closed cleanly with the proper messages. Any other way of closing the it is considered an error to avoid truncation attacks.