//-----------------------------------------------------------------------------
    // Purpose: Handle clients connecting
    //-----------------------------------------------------------------------------
    void OnP2PSessionRequest(P2PSessionRequest_t pCallback)
    {
        Debug.Log("OnP2PSesssionRequest Called steamIDRemote: " + pCallback.m_steamIDRemote);         // Riley

        // we'll accept a connection from anyone
        SteamGameServerNetworking.AcceptP2PSessionWithUser(pCallback.m_steamIDRemote);
    }
Exemplo n.º 2
0
        protected override void OnNewConnection(P2PSessionRequest_t result)
        {
#if UNITY_SERVER
            SteamGameServerNetworking.AcceptP2PSessionWithUser(result.m_steamIDRemote);
#else
            SteamNetworking.AcceptP2PSessionWithUser(result.m_steamIDRemote);
#endif
        }
 protected override void OnNewConnection(P2PSessionRequest_t result)
 {
     if (hostSteamID == result.m_steamIDRemote)
     {
         SteamGameServerNetworking.AcceptP2PSessionWithUser(result.m_steamIDRemote);
     }
     else
     {
         Debug.LogError("P2P Acceptance Request from unknown host ID.");
     }
 }
Exemplo n.º 4
0
 public void OnP2PSessionRequest(P2PSessionRequest_t callback)
 {
     if (!SteamGameServerNetworking.AcceptP2PSessionWithUser(callback.m_steamIDRemote))
     {
         LogUtils.Debug("Failde to accept P2P Request: " + callback.m_steamIDRemote);
     }
     else
     {
         LogUtils.Debug("Accepted P2P Request: " + callback.m_steamIDRemote);
     }
 }
Exemplo n.º 5
0
 static void OnP2PSessionRequest(P2PSessionRequest_t callback)
 {
     // accept connection request to anyone
     if (connectedPlayer == callback.m_steamIDRemote)
     {
         SteamGameServerNetworking.AcceptP2PSessionWithUser(callback.m_steamIDRemote);
     }
     else
     {
         Console.WriteLine("Rejecting connection request.");
     }
 }
Exemplo n.º 6
0
    private static void P2PSessionRequest(P2PSessionRequest_t param)
    {
        SteamGameServer.EnableHeartbeats(true);
        Debug.Log("CoopSteamServer.P2PSessionRequest (host): remoteId=" + param.m_steamIDRemote);
        SteamGameServerNetworking.AcceptP2PSessionWithUser(param.m_steamIDRemote);
        P2PSessionState_t p2PSessionState_t;

        if (SteamGameServerNetworking.GetP2PSessionState(param.m_steamIDRemote, out p2PSessionState_t))
        {
            Debug.Log("P2P Session with " + param.m_steamIDRemote + " accepted");
        }
        else
        {
            Debug.Log("P2P Session with " + param.m_steamIDRemote + " failed");
        }
    }
        private void OnP2PSessionRequest(P2PSessionRequest_t request)
        {
            if (NetworkManager.Singleton.LogLevel <= LogLevel.Developer)
            {
                NetworkLog.LogInfoServer(nameof(SteamNetworkingTransport) + " - OnP2PSessionRequest - m_steamIDRemote: " + request.m_steamIDRemote);
            }

            CSteamID userId = request.m_steamIDRemote;

            //Todo: Might want to check if we expect the user before just accepting it.
#if UNITY_SERVER
            SteamGameServerNetworking.AcceptP2PSessionWithUser(userId);
#else
            SteamNetworking.AcceptP2PSessionWithUser(userId);
#endif
        }
        // Token: 0x06001839 RID: 6201 RVA: 0x000891C0 File Offset: 0x000875C0
        private void onP2PSessionRequest(P2PSessionRequest_t callback)
        {
            CSteamID steamIDRemote = callback.m_steamIDRemote;

            SteamGameServerNetworking.AcceptP2PSessionWithUser(steamIDRemote);
        }
Exemplo n.º 9
0
 private void OnP2PSessionRequest(P2PSessionRequest_t pCallback)
 {
     Debug.Log("OnP2PSesssionRequest Called steamIDRemote: " + pCallback.m_steamIDRemote);
     SteamGameServerNetworking.AcceptP2PSessionWithUser(pCallback.m_steamIDRemote);
 }
 protected override void OnNewConnection(P2PSessionRequest_t result) => SteamGameServerNetworking.AcceptP2PSessionWithUser(result.m_steamIDRemote);
Exemplo n.º 11
0
 /// <summary>
 /// Handle clients connecting to the server
 /// </summary>
 /// <param name="callback"> Callback variable sent to server containing steam id of connecting client </param>
 void OnP2PSessionRequest(P2PSessionRequest_t callback)
 {
     // accept connection request to anyone
     SteamGameServerNetworking.AcceptP2PSessionWithUser(callback.m_steamIDRemote);
 }
Exemplo n.º 12
0
 void OnP2PSessionRequest(P2PSessionRequest_t pCallback)
 {
     SteamGameServerNetworking.AcceptP2PSessionWithUser(pCallback.m_steamIDRemote);
 }