7#ifndef ISTEAMNETWORKINGUTILS
8#define ISTEAMNETWORKINGUTILS
14struct SteamDatagramRelayAuthTicket;
354#define STEAMNETWORKINGUTILS_INTERFACE_VERSION "SteamNetworkingUtils004"
358#ifdef STEAMNETWORKINGSOCKETS_STANDALONELIB
365 #ifndef STEAMNETWORKINGSOCKETS_STEAMAPI
371#ifdef STEAMNETWORKINGSOCKETS_STEAMAPI
382 #ifndef STEAMNETWORKINGSOCKETS_STANDALONELIB
475#if defined( STEAMNETWORKINGSOCKETS_STATIC_LINK ) || defined(STEAMNETWORKINGSOCKETS_FOREXPORT) || defined( STEAMNETWORKINGSOCKETS_STANDALONELIB )
483 inline void SteamNetworkingIPAddr::ToString(
char *buf,
size_t cbBuf,
bool bWithPort )
const { SteamNetworkingIPAddr_ToString(
this, buf, cbBuf, bWithPort ); }
489#elif defined( STEAMNETWORKINGSOCKETS_STEAMAPI )
491 inline void SteamNetworkingIPAddr::ToString(
char *buf,
size_t cbBuf,
bool bWithPort )
const { SteamNetworkingUtils()->SteamNetworkingIPAddr_ToString( *
this, buf, cbBuf, bWithPort ); }
497 #error "Invalid config"
bool SetConfigValueStruct(const SteamNetworkingConfigValue_t &opt, ESteamNetworkingConfigScope eScopeType, intptr_t scopeObj)
virtual bool CheckPingDataUpToDate(float flMaxAgeSeconds)=0
bool SetConnectionConfigValueFloat(HSteamNetConnection hConn, ESteamNetworkingConfigValue eValue, float val)
virtual int EstimatePingTimeFromLocalHost(const SteamNetworkPingLocation_t &remoteLocation)=0
virtual ESteamNetworkingConfigValue IterateGenericEditableConfigValues(ESteamNetworkingConfigValue eCurrent, bool bEnumerateDevVars)=0
bool SetGlobalConfigValueFloat(ESteamNetworkingConfigValue eValue, float val)
virtual SteamNetworkingMessage_t * AllocateMessage(int cbAllocateBuffer)=0
virtual ESteamNetworkingGetConfigValueResult GetConfigValue(ESteamNetworkingConfigValue eValue, ESteamNetworkingConfigScope eScopeType, intptr_t scopeObj, ESteamNetworkingConfigDataType *pOutDataType, void *pResult, size_t *cbResult)=0
bool SetGlobalConfigValuePtr(ESteamNetworkingConfigValue eValue, void *val)
bool SetGlobalCallback_FakeIPResult(FnSteamNetworkingFakeIPResult fnCallback)
bool SetConnectionConfigValueInt32(HSteamNetConnection hConn, ESteamNetworkingConfigValue eValue, int32 val)
virtual bool SteamNetworkingIPAddr_ParseString(SteamNetworkingIPAddr *pAddr, const char *pszStr)=0
virtual void SteamNetworkingIdentity_ToString(const SteamNetworkingIdentity &identity, char *buf, size_t cbBuf)=0
virtual int GetPOPList(SteamNetworkingPOPID *list, int nListSz)=0
virtual void ConvertPingLocationToString(const SteamNetworkPingLocation_t &location, char *pszBuf, int cchBufSize)=0
virtual const char * GetConfigValueInfo(ESteamNetworkingConfigValue eValue, ESteamNetworkingConfigDataType *pOutDataType, ESteamNetworkingConfigScope *pOutScope)=0
void InitRelayNetworkAccess()
bool IsFakeIPv4(uint32 nIPv4)
virtual int GetDirectPingToPOP(SteamNetworkingPOPID popID)=0
Get direct ping time to the relays at the data center.
bool SetGlobalCallback_MessagesSessionRequest(FnSteamNetworkingMessagesSessionRequest fnCallback)
virtual ESteamNetworkingFakeIPType SteamNetworkingIPAddr_GetFakeIPType(const SteamNetworkingIPAddr &addr)=0
virtual bool SetConfigValue(ESteamNetworkingConfigValue eValue, ESteamNetworkingConfigScope eScopeType, intptr_t scopeObj, ESteamNetworkingConfigDataType eDataType, const void *pArg)=0
bool SetGlobalCallback_SteamRelayNetworkStatusChanged(FnSteamRelayNetworkStatusChanged fnCallback)
bool SetGlobalConfigValueString(ESteamNetworkingConfigValue eValue, const char *val)
virtual float GetLocalPingLocation(SteamNetworkPingLocation_t &result)=0
virtual SteamNetworkingMicroseconds GetLocalTimestamp()=0
virtual int GetPingToDataCenter(SteamNetworkingPOPID popID, SteamNetworkingPOPID *pViaRelayPoP)=0
virtual ESteamNetworkingFakeIPType GetIPv4FakeIPType(uint32 nIPv4)=0
virtual void SetDebugOutputFunction(ESteamNetworkingSocketsDebugOutputType eDetailLevel, FSteamNetworkingSocketsDebugOutput pfnFunc)=0
virtual int GetPOPCount()=0
Get number of network points of presence in the config.
virtual int EstimatePingTimeBetweenTwoLocations(const SteamNetworkPingLocation_t &location1, const SteamNetworkPingLocation_t &location2)=0
virtual ESteamNetworkingAvailability GetRelayNetworkStatus(SteamRelayNetworkStatus_t *pDetails)=0
bool SetGlobalCallback_SteamNetAuthenticationStatusChanged(FnSteamNetAuthenticationStatusChanged fnCallback)
virtual EResult GetRealIdentityForFakeIP(const SteamNetworkingIPAddr &fakeIP, SteamNetworkingIdentity *pOutRealIdentity)=0
bool SetGlobalCallback_SteamNetConnectionStatusChanged(FnSteamNetConnectionStatusChanged fnCallback)
bool SetConnectionConfigValueString(HSteamNetConnection hConn, ESteamNetworkingConfigValue eValue, const char *val)
virtual bool SteamNetworkingIdentity_ParseString(SteamNetworkingIdentity *pIdentity, const char *pszStr)=0
virtual bool ParsePingLocationString(const char *pszString, SteamNetworkPingLocation_t &result)=0
bool SetGlobalCallback_MessagesSessionFailed(FnSteamNetworkingMessagesSessionFailed fnCallback)
bool SetGlobalConfigValueInt32(ESteamNetworkingConfigValue eValue, int32 val)
virtual void SteamNetworkingIPAddr_ToString(const SteamNetworkingIPAddr &addr, char *buf, size_t cbBuf, bool bWithPort)=0
#define STEAMNETWORKINGUTILS_INTERFACE_VERSION
const char *typedef uint32(S_CALLTYPE *SteamAPI_CheckCallbackRegistered_t)(int iCallbackNum)
@ k_iSteamNetworkingUtilsCallbacks
S_API void *S_CALLTYPE SteamInternal_FindOrCreateGameServerInterface(HSteamUser hSteamUser, const char *pszVersion)
S_API void *S_CALLTYPE SteamInternal_FindOrCreateUserInterface(HSteamUser hSteamUser, const char *pszVersion)
#define STEAM_DEFINE_INTERFACE_ACCESSOR(type, name, expr, kind, version)
#define STEAMNETWORKINGSOCKETS_INTERFACE
ESteamNetworkingSocketsDebugOutputType
void(*) FnSteamNetConnectionStatusChanged(SteamNetConnectionStatusChangedCallback_t *)
void(*) FnSteamNetworkingFakeIPResult(SteamNetworkingFakeIPResult_t *)
int64 SteamNetworkingMicroseconds
ESteamNetworkingFakeIPType
@ k_ESteamNetworkingFakeIPType_NotFake
uint32 HSteamNetConnection
Handle used to identify a connection to a remote host.
void(*) FnSteamNetAuthenticationStatusChanged(SteamNetAuthenticationStatus_t *)
ESteamNetworkingConfigScope
Configuration values can be applied to different types of objects.
@ k_ESteamNetworkingConfig_Connection
Options for a specific connection.
@ k_ESteamNetworkingConfig_Global
ESteamNetworkingConfigValue
Configuration options.
@ k_ESteamNetworkingConfig_Callback_ConnectionStatusChanged
@ k_ESteamNetworkingConfig_Callback_RelayNetworkStatusChanged
@ k_ESteamNetworkingConfig_Callback_MessagesSessionFailed
@ k_ESteamNetworkingConfig_Callback_MessagesSessionRequest
@ k_ESteamNetworkingConfig_Callback_FakeIPResult
@ k_ESteamNetworkingConfig_Callback_AuthStatusChanged
void(*) FSteamNetworkingSocketsDebugOutput(ESteamNetworkingSocketsDebugOutputType nType, const char *pszMsg)
Setup callback for debug output, and the desired verbosity you want.
ESteamNetworkingAvailability
Describe the status of a particular network resource.
void(*) FnSteamNetworkingMessagesSessionRequest(SteamNetworkingMessagesSessionRequest_t *)
void(*) FnSteamNetworkingMessagesSessionFailed(SteamNetworkingMessagesSessionFailed_t *)
ESteamNetworkingGetConfigValueResult
Return value of ISteamNetworkintgUtils::GetConfigValue.
void(*) FnSteamRelayNetworkStatusChanged(SteamRelayNetworkStatus_t *)
uint32 SteamNetworkingPOPID
ESteamNetworkingConfigDataType
@ k_ESteamNetworkingConfig_String
@ k_ESteamNetworkingConfig_Int32
@ k_ESteamNetworkingConfig_Ptr
@ k_ESteamNetworkingConfig_Float
ESteamNetworkingConfigValue m_eValue
Which option is being set.
union SteamNetworkingConfigValue_t::@226264230310136375067366131222017367032047164040 m_val
ESteamNetworkingConfigDataType m_eDataType
Which field below did you fill in?
bool ParseString(const char *pszStr)
ESteamNetworkingFakeIPType GetFakeIPType() const
void ToString(char *buf, size_t cbBuf, bool bWithPort) const
SteamNetworkingIPAddrRender(const SteamNetworkingIPAddr &x, bool bWithPort=true)
char buf[SteamNetworkingIPAddr::k_cchMaxString]
const char * c_str() const
bool ParseString(const char *pszStr)
void ToString(char *buf, size_t cbBuf) const
char buf[SteamNetworkingIdentity::k_cchMaxString]
SteamNetworkingIdentityRender(const SteamNetworkingIdentity &x)
const char * c_str() const
A message that has been received.
ESteamNetworkingAvailability m_eAvailNetworkConfig
ESteamNetworkingAvailability m_eAvailAnyRelay
int m_bPingMeasurementInProgress
ESteamNetworkingAvailability m_eAvail