docs: def connectionStats(self) -> ConnectionStats:
          """
          Get statistics about the connection.
          """
          if not self.isReady():
              raise ConnectionError('Not connected')
          return ConnectionStats(
              self._startTime,
              time.time() - self._startTime,
              self._numBytesRecv, self.conn.numBytesSent,
              self._numMsgRecv, self.conn.numMsgSent)