QtCraft API C++ classes QML types Handbook

QcMsg::LatencyProbe Struct

struct QcMsg::LatencyProbe

Client -> server: measures the round trip of the connection (decision E-886). More...

Header: #include <common/protocol/QcSessionMessages.h>

Public Variables

quint32 nonce
qint32 reportedUs

Static Public Members

const qint32 maxReportedUs

Detailed Description

The client's tick thread sends one every half second while it plays; the server answers on its thread at once with a LatencyEcho of the same nonce, without waiting for a tick. reportedUs is the client's smoothed round trip so far, which the server lists with the player (PlayerList); -1 while unknown.

Member Variable Documentation

const qint32 LatencyProbe::maxReportedUs

Longer round trips are reported as this (a minute).

quint32 LatencyProbe::nonce

The number the LatencyEcho repeats.

qint32 LatencyProbe::reportedUs

The client's smoothed round trip in microseconds; -1 while unknown.