You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
// Check for connecting to an identity in this process
2412
-
for ( CSteamNetworkingSockets *pLocalInstance: CSteamNetworkingSockets::s_vecSteamNetworkingSocketsInstances )
2411
+
// Check for connecting to an identity in this process. In some test environments we may intentionally
2412
+
// disable this optimization to force two clients to talk to each other through the relay
2413
+
if ( m_TEST_bEnableP2PLoopbackOptimization )
2413
2414
{
2414
-
if ( pLocalInstance->InternalGetIdentity() == identityRemote )
2415
+
for ( CSteamNetworkingSockets *pLocalInstance: CSteamNetworkingSockets::s_vecSteamNetworkingSocketsInstances )
2415
2416
{
2416
-
2417
-
// This is the guy we want to talk to. Are we listening on that virtual port?
2418
-
int idx = pLocalInstance->m_mapListenSocketsByVirtualPort.Find( nRemoteVirtualPort );
2419
-
if ( idx == pLocalInstance->m_mapListenSocketsByVirtualPort.InvalidIndex() )
2417
+
if ( pLocalInstance->InternalGetIdentity() == identityRemote )
2420
2418
{
2421
-
SpewError( "Cannot create P2P connection to local identity %s. We are not listening on vport %d", SteamNetworkingIdentityRender( identityRemote ).c_str(), nRemoteVirtualPort );
// This is the guy we want to talk to. Are we listening on that virtual port?
2421
+
int idx = pLocalInstance->m_mapListenSocketsByVirtualPort.Find( nRemoteVirtualPort );
2422
+
if ( idx == pLocalInstance->m_mapListenSocketsByVirtualPort.InvalidIndex() )
2423
+
{
2424
+
SpewError( "Cannot create P2P connection to local identity %s. We are not listening on vport %d", SteamNetworkingIdentityRender( identityRemote ).c_str(), nRemoteVirtualPort );
2425
+
returnnullptr;
2426
+
}
2435
2427
2436
-
// Failed?
2437
-
SpewError( "P2P connection to local identity %s on vport %d; FAILED to create loopback. %s\n",
0 commit comments