MCPcopy Create free account
hub / github.com/ValveSoftware/GameNetworkingSockets / ResetConnectionCounters

Function ResetConnectionCounters

tests/test_p2p.cpp:157–165  ·  view source on GitHub ↗

Reset all per-connection counters. Called at the start of each new connection.

Source from the content-addressed store, hash-verified

155
156// Reset all per-connection counters. Called at the start of each new connection.
157void ResetConnectionCounters()
158{
159 g_bConnected = false;
160 g_nTicksDone = 0;
161 g_nSendCounterReliable = 0;
162 g_nSendCounterUnreliable = 0;
163 g_nRecvExpectedReliable = 0;
164 g_nRecvExpectedUnreliable = 0;
165}
166
167// Each tick: if the send buffer is below the limit, roll 0-4 messages to send.
168// Each message is randomly reliable or unreliable, with a counter in the first

Callers 2

mainFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected