close method

  1. @override
Future<void> close([
  1. CloseStatus status = CloseStatus.normal
])
override

Closes the connection, sending status (CloseStatus.normal by default) to the other side. The future completes when the connection is closed.

Implementation

@override
Future<void> close([CloseStatus status = CloseStatus.normal]) {
  if (!isClosed) {
    _closedByClient = true;
  }
  return _end(status);
}