onClose abstract method

FutureOr<void> onClose(
  1. Peer peer, {
  2. int? code,
  3. String? reason,
})

Received a hook from a connected client or actively closed the websocket call on the server side.

Implementation

FutureOr<void> onClose(Peer peer, {int? code, String? reason});