close method

  1. @override
Future close(
  1. [int? closeCode,
  2. String? closeReason]
)

Closes the web socket connection.

closeCode and closeReason are the close code and reason sent to the remote peer, respectively. If they are omitted, the peer will see a "no status received" code with no reason.

Implementation

@override
Future close([int? closeCode, String? closeReason]) =>
    _webSocket.close(closeCode, closeReason);