Skip to content

Commit aaa54dc

Browse files
committed
Add plumbing for Diagnostics UI.
This is only compiled in if STEAMNETWORKINGSOCKETS_ENABLE_DIAGNOSTICSUI is defined, which is only the case when running with Steam. So no functional change (is intended) for the opensource version of the code, just syncing up with Steam. P4:6570679,6570685,6570693,6570802,6570807,6570812
1 parent 2a47b80 commit aaa54dc

File tree

6 files changed

+379
-25
lines changed

6 files changed

+379
-25
lines changed

src/steamnetworkingsockets/clientlib/csteamnetworkingsockets.h

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -287,6 +287,18 @@ class CSteamNetworkingUtils : public IClientNetworkingUtils
287287
// Reset this utils instance for testing
288288
virtual void TEST_ResetSelf();
289289

290+
// Post a connection update message to the OS diagnostics
291+
#ifdef STEAMNETWORKINGSOCKETS_ENABLE_DIAGNOSTICSUI
292+
virtual void PostConnectionStateUpdateForDiagnosticsUI( ESteamNetworkingConnectionState eOldState, CSteamNetworkConnectionBase *pConnection, SteamNetworkingMicroseconds usecNow ) = 0;
293+
294+
// Desired update interval for connections, outside of state changes.
295+
// The default is zero, which means no updates, not even for state changes.
296+
// Derived classes that override PostConnectionStateUpdateForDiagnosticsUI must set this.
297+
SteamNetworkingMicroseconds m_usecConnectionUpdateFrequency = 0;
298+
#else
299+
static constexpr SteamNetworkingMicroseconds m_usecConnectionUpdateFrequency = 0;
300+
#endif
301+
290302
// Stubs if SDR not enabled
291303
#ifndef STEAMNETWORKINGSOCKETS_ENABLE_SDR
292304
virtual ESteamNetworkingAvailability GetRelayNetworkStatus( SteamRelayNetworkStatus_t *pDetails ) override

0 commit comments

Comments
 (0)