Exemplo n.º 1
0
Arquivo: Dht.cs Projeto: 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);
        }
Exemplo n.º 2
0
Arquivo: Dht.cs Projeto: Renha/Tox.NET
 private void SendPingResponse(DhtFriend friend, ulong pingID)
 {
     var response = new PingResponse(KeyPair.PublicKey, pingID);
     _net.SendPacket(friend, response);
 }