code: @Override
    public void close(WebSocketClose reason, String text)
    {
      Objects.requireNonNull(reason);
  
      if (_state.isClosed()) {
        return;
      }
  
      _state = _state.closeSelf();
  
      _frameOut.close(reason, text);
  
      if (_state.isClosed()) {
        disconnect();
      }
    }
docs: Close the websocket.