close method

Future<void> close()

Close this connection and all associated resources.

Implementation

Future<void> close() async {
  _closing = true;
  await _webSocket?.close(1000);
  await _messagesController.done;
}