Beispiel #1
0
        public void RespondToPing(JamPacket pingPacket)
        {
            if (pingPacket.Header.DataType != PingRequest.DATA_TYPE)
            {
                return;
            }

            PingRequest  request  = new PingRequest(pingPacket.Data);
            PingResponse response = new PingResponse(request.PingTimeUtc, DateTime.UtcNow);

            JamPacket responsePacket = new JamPacket(PingResponse.DATA_TYPE, response.GetBytes());

            Send(responsePacket);
        }
Beispiel #2
0
        public void RespondToPing(JamPacket pingPacket)
        {
            if (pingPacket.Header.DataType != PingRequest.DATA_TYPE)
            {
                return;
            }

            PingRequest request = new PingRequest(pingPacket.Data, Serializer);

            PingResponse response = new PingResponse(request.PingTimeUtc, DateTime.UtcNow, Serializer);

            Guid accountID = Guid.Empty;

            if (Account != null)
            {
                accountID = Account.AccountID;
            }

            JamPacket responsePacket = new JamPacket(pingPacket.Header.Sender, accountID, PingResponse.DATA_TYPE, response.GetBytes());

            Send(responsePacket);
        }