docs: def close(self):
          """Close the socket without sending quit message."""
          stream = self._stream
          if stream is None:
              return
          self._stream = None
          stream.close()