protected override void OnNewConnection(OnIncomingConnectionRequestInfo result)
        {
            if (ignoreAllMessages)
            {
                return;
            }

            if (deadSockets.Contains(result.SocketId.SocketName))
            {
                Debug.LogError("Received incoming connection request from dead socket");
                return;
            }

            if (hostProductId == result.RemoteUserId)
            {
                EOSSDKComponent.GetP2PInterface().AcceptConnection(
                    new AcceptConnectionOptions()
                {
                    LocalUserId  = EOSSDKComponent.LocalUserProductId,
                    RemoteUserId = result.RemoteUserId,
                    SocketId     = result.SocketId
                });
            }
            else
            {
                Debug.LogError("P2P Acceptance Request from unknown host ID.");
            }
        }
        /// <summary>
        ///     New incoming connection from someone. We check to see if its same as in address atm for security.
        /// </summary>
        /// <param name="result">The data we need to process to make a accept the new connection request.</param>
        protected override void OnNewConnection(OnIncomingConnectionRequestInfo result)
        {
            if (_initialWait)
            {
                return;
            }

            if (Options.ConnectionAddress == result.RemoteUserId)
            {
                EpicManager.P2PInterface.AcceptConnection(
                    new AcceptConnectionOptions
                {
                    LocalUserId  = EpicManager.AccountId.ProductUserId,
                    RemoteUserId = result.RemoteUserId,
                    SocketId     = result.SocketId
                });

                _connectedComplete.TrySetResult();

                SocketName = result.SocketId;
            }
            else
            {
                if (Logger.logEnabled)
                {
                    if (Transport.transportDebug)
                    {
                        DebugLogger.RegularDebugLog("[Client] - P2P Acceptance Request from unknown host ID.",
                                                    LogType.Error);
                    }
                }
            }
        }
 protected override void OnNewConnection(OnIncomingConnectionRequestInfo result) => EOSSDKComponent.EOS.GetP2PInterface().AcceptConnection(
     new AcceptConnectionOptions()
 {
     LocalUserId  = EOSSDKComponent.localUserProductId,
     RemoteUserId = result.RemoteUserId,
     SocketId     = new SocketId()
     {
         SocketName = SOCKET_ID
     }
 });
 protected override void OnNewConnection(OnIncomingConnectionRequestInfo result)
 {
     if (hostProductId == result.RemoteUserId)
     {
         EOSSDKComponent.EOS.GetP2PInterface().AcceptConnection(
             new AcceptConnectionOptions()
         {
             LocalUserId  = EOSSDKComponent.localUserProductId,
             RemoteUserId = result.RemoteUserId,
             SocketId     = new SocketId()
             {
                 SocketName = SOCKET_ID
             }
         });
     }
     else
     {
         Debug.LogError("P2P Acceptance Request from unknown host ID.");
     }
 }
Beispiel #5
0
        protected override void OnNewConnection(OnIncomingConnectionRequestInfo result)
        {
            if (ignoreAllMessages)
            {
                return;
            }

            if (deadSockets.Contains(result.SocketId.SocketName))
            {
                Debug.LogError("Received incoming connection request from dead socket");
                return;
            }

            EosTransport.P2PInterface.AcceptConnection(
                new AcceptConnectionOptions()
            {
                LocalUserId  = EosTransport.LocalUserProductId,
                RemoteUserId = result.RemoteUserId,
                SocketId     = result.SocketId
            });
        }
        /// <summary>
        ///     We accept all incoming connection request on server.
        /// </summary>
        /// <param name="result">The data we need to process to make a accept the new connection request.</param>
        protected override void OnNewConnection(OnIncomingConnectionRequestInfo result)
        {
            Result accepted = EpicManager.P2PInterface.AcceptConnection(new AcceptConnectionOptions
            {
                LocalUserId  = EpicManager.AccountId.ProductUserId,
                RemoteUserId = result.RemoteUserId,
                SocketId     = result.SocketId
            });

            if (accepted == Result.Success)
            {
                return;
            }

            if (Logger.logEnabled)
            {
                if (Transport.transportDebug)
                {
                    DebugLogger.RegularDebugLog(
                        $"[Server] - Received internal connection message but failed to accepted connection. Result: {accepted}");
                }
            }
        }
Beispiel #7
0
 protected abstract void OnNewConnection(OnIncomingConnectionRequestInfo result);