code: def close(self, code: int = None, reason: str = None) -> None:
          
          if self.protocol is not None:
              self.protocol.close(code, reason)
              self.protocol = None
docs: Closes the websocket connection.
  
          ``code`` and ``reason`` are documented under
          `WebSocketHandler.close`.
  
          .. versionadded:: 3.2
  
          .. versionchanged:: 4.0
  
             Added the ``code`` and ``reason`` arguments.