From f6a2c0e5ef533f8db000ec67627d2a07e4da962a Mon Sep 17 00:00:00 2001 From: Mr_Goldberg Date: Thu, 27 Aug 2020 00:15:15 -0400 Subject: [PATCH] ISteamNetworkingSocketsSerialized004 --- dll/steam_client.cpp | 4 +++- dll/steam_networking_socketsserialized.h | 14 +++++++++++++- sdk_includes/isteamnetworkingsocketsserialized.h | 15 +++++++++++++++ sdk_includes/steam_api.h | 2 +- 4 files changed, 32 insertions(+), 3 deletions(-) diff --git a/dll/steam_client.cpp b/dll/steam_client.cpp index 818eeed9..0e10d75a 100644 --- a/dll/steam_client.cpp +++ b/dll/steam_client.cpp @@ -471,8 +471,10 @@ void *Steam_Client::GetISteamGenericInterface( HSteamUser hSteamUser, HSteamPipe return (void *)(ISteamNetworkingSocketsSerialized002 *)steam_networking_sockets_serialized_temp; } else if (strcmp(pchVersion, "SteamNetworkingSocketsSerialized003") == 0) { return (void *)(ISteamNetworkingSocketsSerialized003 *)steam_networking_sockets_serialized_temp; + } else if (strcmp(pchVersion, "SteamNetworkingSocketsSerialized004") == 0) { + return (void *)(ISteamNetworkingSocketsSerialized004 *)steam_networking_sockets_serialized_temp; } else { - return (void *)(ISteamNetworkingSocketsSerialized003 *)steam_networking_sockets_serialized_temp; + return (void *)(ISteamNetworkingSocketsSerialized004 *)steam_networking_sockets_serialized_temp; } } else if (strstr(pchVersion, "SteamNetworkingSockets") == pchVersion) { Steam_Networking_Sockets *steam_networking_sockets_temp; diff --git a/dll/steam_networking_socketsserialized.h b/dll/steam_networking_socketsserialized.h index 2c9cc9a1..327d59b5 100644 --- a/dll/steam_networking_socketsserialized.h +++ b/dll/steam_networking_socketsserialized.h @@ -19,7 +19,8 @@ class Steam_Networking_Sockets_Serialized : public ISteamNetworkingSocketsSerialized002, -public ISteamNetworkingSocketsSerialized003 +public ISteamNetworkingSocketsSerialized003, +public ISteamNetworkingSocketsSerialized004 { class Settings *settings; class Networking *network; @@ -116,6 +117,17 @@ void PostConnectionStateMsg( const void *pMsg, uint32 cbMsg ) PRINT_DEBUG("Steam_Networking_Sockets_Serialized::PostConnectionStateMsg\n"); } +bool GetSTUNServer(int dont_know, char *buf, unsigned int len) +{ + PRINT_DEBUG("Steam_Networking_Sockets_Serialized::GetSTUNServer %i %p %u\n", dont_know, buf, len); + return false; +} + +bool BAllowDirectConnectToPeer(SteamNetworkingIdentity const &identity) +{ + PRINT_DEBUG("Steam_Networking_Sockets_Serialized::BAllowDirectConnectToPeer\n"); + return true; +} void RunCallbacks() { diff --git a/sdk_includes/isteamnetworkingsocketsserialized.h b/sdk_includes/isteamnetworkingsocketsserialized.h index 0c6958d7..41debcd5 100644 --- a/sdk_includes/isteamnetworkingsocketsserialized.h +++ b/sdk_includes/isteamnetworkingsocketsserialized.h @@ -31,6 +31,21 @@ public: virtual void PostConnectionStateMsg( const void *pMsg, uint32 cbMsg ) = 0; }; +class ISteamNetworkingSocketsSerialized004 +{ +public: + virtual void SendP2PRendezvous( CSteamID steamIDRemote, uint32 unConnectionIDSrc, const void *pMsgRendezvous, uint32 cbRendezvous ) = 0; + virtual void SendP2PConnectionFailure( CSteamID steamIDRemote, uint32 unConnectionIDDest, uint32 nReason, const char *pszReason ) = 0; + virtual SteamAPICall_t GetCertAsync() = 0; + virtual int GetNetworkConfigJSON( void *buf, uint32 cbBuf, const char *pszLauncherPartner ) = 0; + virtual void CacheRelayTicket( const void *pTicket, uint32 cbTicket ) = 0; + virtual uint32 GetCachedRelayTicketCount() = 0; + virtual int GetCachedRelayTicket( uint32 idxTicket, void *buf, uint32 cbBuf ) = 0; + virtual void PostConnectionStateMsg( const void *pMsg, uint32 cbMsg ) = 0; + virtual bool GetSTUNServer(int dont_know, char *buf, unsigned int len) = 0; + virtual bool BAllowDirectConnectToPeer(SteamNetworkingIdentity const &identity) = 0; +}; + struct SteamNetworkingSocketsConfigUpdated_t { enum { k_iCallback = k_iSteamNetworkingCallbacks + 95 }; diff --git a/sdk_includes/steam_api.h b/sdk_includes/steam_api.h index 1a349295..7b707e49 100644 --- a/sdk_includes/steam_api.h +++ b/sdk_includes/steam_api.h @@ -98,8 +98,8 @@ #include "isteamnetworking003.h" #include "isteamnetworking002.h" #include "isteamnetworking001.h" -#include "isteamnetworkingsocketsserialized.h" #include "isteamnetworkingsockets.h" +#include "isteamnetworkingsocketsserialized.h" #include "isteamnetworkingutils.h" #include "isteamnetworkingutils001.h" #include "isteamnetworkingutils002.h"