INetChannelInfo

From Valve Developer Community
Revision as of 07:32, 19 October 2010 by TomEdwards (talk | contribs) (Created page with ''''<code>INetChannelInfo</code>''' is an engine interface that provides information about connected clients. It is available from the moment that a client connects. There is…')
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
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