QtCraft API C++ classes QML types Handbook

QcLinkStats Class

The connection as the health line sees it (decision E-834): the round trip of player inputs (from sending one until a player state acknowledges it, so it includes up to one server tick) and the bytes of the connection. More...

Header: #include <clientcore/tick/QcLinkStats.h>

Public Types

struct Taken

Public Functions

void acknowledged(quint32 sequence, qint64 nowNs)
void inputSent(quint32 sequence, qint64 nowNs)
void setTraffic(QcTraffic traffic)
QcLinkStats::Taken take()

Static Public Members

const int remembered

Detailed Description

Written by the thread that ticks the session (QcSessionCore), read by others; every access takes the mutex.

Member Function Documentation

void QcLinkStats::acknowledged(quint32 sequence, qint64 nowNs)

The server applied the inputs up to sequence, noted at nowNs.

void QcLinkStats::inputSent(quint32 sequence, qint64 nowNs)

The input numbered sequence was sent at nowNs.

void QcLinkStats::setTraffic(QcTraffic traffic)

Takes the bytes of the connection so far, traffic.

QcLinkStats::Taken QcLinkStats::take()

Returns the round trips since the previous take() and the traffic so far.

Member Variable Documentation

const int QcLinkStats::remembered

Inputs remembered until acknowledged; older ones are forgotten (20 per second).