INetChannelInfo

From Valve Developer Community
Jump to: navigation, search

INetChannelInfo is an engine interface that provides information about connected clients. It is available from the moment that a client connects.

There is no way to get the player's name, userid or edict from INetChannelInfo.

Usage

INetChannelInfo* netinfo = engine->GetPlayerNetInfo(int playerIndex);

Notable members

char* GetName()
The name of the connection - not of the player. Typically (always?) the user's IP address.
float GetAvgLatency(int flow)
float GetAvgLoss(int flow)
float GetAvgChoke(int flow)
etc...
Functions that require a "flow" argument expect FLOW_OUTGOING, FLOW_INCOMING, or MAX_FLOWS (in + out).

See also