public void DHTHelper_Tests() { var tid = DHTHelper.GetTransactionId(); Assert.IsNotNull(tid); Assert.AreEqual(2, tid.Length); var randId = DHTHelper.GetRandomID(); Assert.IsNotNull(randId); Assert.AreEqual(20, randId.Length); var randShaId = DHTHelper.GetRandomHashID(); Assert.IsNotNull(randShaId); Assert.AreEqual(20, randShaId.Length); }
public void SendMessage(Peer peer, string message) { SendData(peer.EndPoint, ProtocolHelper.CreateChatMessage(DHTHelper.GetTransactionId(), fDHTClient.LocalID, message)); }