Received a hook from a connected client or actively closed the websocket call on the server side.
FutureOr<void> onClose(Peer peer, {int? code, String? reason});