Closes the session.
Future<void> close([int code = 1000, String? reason]) async { if (_closed) return; _closed = true; bus._remove(this); await socket.close(code, reason); }