Beispiel #1
0
        private void UdpMsg(INetworkChannel channel)
        {
            var ping = PingRequestMessage.Allocate();

            ping.Id   = _seq;
            ping.Type = false;
            ping.Time = DateTime.UtcNow.ToMillisecondsSinceEpoch();
            channel.SendRealTime((int)EClient2ServerMessage.Ping, ping);
            ping.ReleaseReference();
        }
Beispiel #2
0
        private void TcpMsg(INetworkChannel channel)
        {
            var ping = PingRequestMessage.Allocate();

            ping.Id   = _seq;
            ping.Type = true;
            ping.Time = DateTime.UtcNow.ToMillisecondsSinceEpoch();
            ;
            channel.SendReliable((int)EClient2ServerMessage.Ping, ping);
        }