예제 #1
0
파일: Dht.cs 프로젝트: Renha/Tox.NET
        private void HandlePingResponse(IPEndPoint endpoint, byte[] data)
        {
            Console.WriteLine("Received ping response from: {0}", endpoint);

            var friend = GetNode(endpoint);
            if (friend == null)
                return;

            var response = new PingResponse(data, friend.SharedKey);

            if (friend.ContainsPing(response.PingID))
                friend.RemovePing(response.PingID);
        }
예제 #2
0
파일: Dht.cs 프로젝트: Renha/Tox.NET
 private void SendPingResponse(DhtFriend friend, ulong pingID)
 {
     var response = new PingResponse(KeyPair.PublicKey, pingID);
     _net.SendPacket(friend, response);
 }