close method

void close([
  1. int code = 1000,
  2. String reason = ''
])

Implementation

void close([int code = 1000, String reason = '']) {
  _runInContext(() {
    try {
      socket.close(code, reason);
    } catch (_) {
      // Ignore close errors.
    } finally {
      manager.removeClient(this);
    }
  });
}