private NodeContact Ping(IPEndPoint nodeEP) { DhtRpcPacket response = Query(DhtRpcPacket.CreatePingPacketQuery(_currentNode), new NodeContact(null, nodeEP)); if (response == null) { return(null); } else { return(response.SourceNode); } }
internal bool Ping(NodeContact contact) { DhtRpcPacket response = Query(DhtRpcPacket.CreatePingPacketQuery(_currentNode), contact); if (response == null) { return(false); } else { if (contact.Equals(response.SourceNode)) { return(true); } else { contact.IncrementRpcFailCount(); return(false); } } }