pub type CloseHook = Box<dyn FnMut(&CloseFrame) + Send>;
Hook invoked with the close frame describing why the connection ended.
pub struct CloseHook(/* private fields */);