Exemple #1
0
        public LatencyMonitor OnLatencyMonitorPeerConnected(InitResponse initResponse)
        {
            var monitor  = new LatencyMonitor(initResponse.Protocol, initResponse.PhotonPeer, this.latencyOperationCode, AverageHistoryLength, 500, this);
            var peerType = initResponse.PhotonPeer.GetPeerType();

            if (peerType == PeerType.ENetPeer || peerType == PeerType.ENetOutboundPeer)
            {
                this.latencyMonitorUdp = monitor;
            }
            else
            {
                this.latencyMonitorTcp = monitor;
            }

            return(monitor);
        }
        public LatencyMonitor OnLatencyMonitorPeerConnected(InitResponse initResponse)
        {
            var monitor = new LatencyMonitor(initResponse.Protocol, initResponse.PhotonPeer, this.latencyOperationCode, AverageHistoryLength, 500, this); 
            var peerType = initResponse.PhotonPeer.GetPeerType();

            if (peerType == PeerType.ENetPeer || peerType == PeerType.ENetOutboundPeer)
            {
                this.latencyMonitorUdp = monitor; 
            }
            else
            {
                this.latencyMonitorTcp = monitor; 
            }

            return monitor;
        }