From fe8cbb084e8a8de335c9679102ad8a3734870d97 Mon Sep 17 00:00:00 2001 From: Fletcher Dunn Date: Tue, 7 Jul 2020 18:24:04 -0700 Subject: [PATCH] Pass virtual port to ISteamNetworkingCustomSignalingRecvContext --- include/steam/isteamnetworkingsockets.h | 2 +- .../clientlib/steamnetworkingsockets_p2p.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/include/steam/isteamnetworkingsockets.h b/include/steam/isteamnetworkingsockets.h index 0935130..4ad32b8 100644 --- a/include/steam/isteamnetworkingsockets.h +++ b/include/steam/isteamnetworkingsockets.h @@ -733,7 +733,7 @@ public: /// /// After accepting a connection (through either means), the connection /// will transition into the "finding route" state. - virtual ISteamNetworkingConnectionCustomSignaling *OnConnectRequest( HSteamNetConnection hConn, const SteamNetworkingIdentity &identityPeer ) = 0; + virtual ISteamNetworkingConnectionCustomSignaling *OnConnectRequest( HSteamNetConnection hConn, const SteamNetworkingIdentity &identityPeer, int nLocalVirtualPort ) = 0; /// This is called actively communication rejection or failure /// to the incoming message. If you intend to ignore all incoming requests diff --git a/src/steamnetworkingsockets/clientlib/steamnetworkingsockets_p2p.cpp b/src/steamnetworkingsockets/clientlib/steamnetworkingsockets_p2p.cpp index 824f211..4a161d0 100644 --- a/src/steamnetworkingsockets/clientlib/steamnetworkingsockets_p2p.cpp +++ b/src/steamnetworkingsockets/clientlib/steamnetworkingsockets_p2p.cpp @@ -2461,7 +2461,7 @@ bool CSteamNetworkingSockets::InternalReceivedP2PSignal( const void *pMsg, int c } // Inform app about the incoming request, see what they want to do - pConn->m_pSignaling = pContext->OnConnectRequest( pConn->m_hConnectionSelf, identityRemote ); + pConn->m_pSignaling = pContext->OnConnectRequest( pConn->m_hConnectionSelf, identityRemote, nLocalVirtualPort ); // Already closed? switch ( pConn->GetState() )