public bool SendPacket(Packet packet, uint dwIP, ushort nPort, bool bEncrypt, byte[] pachTargetClientHashORKadID, bool bKad, uint nReceiverVerifyKey) { UDPPack newpending = new UDPPack(); newpending.dwIP = dwIP; newpending.nPort = nPort; newpending.packet = packet; newpending.dwTime = MpdUtilities.GetTickCount(); newpending.bEncrypt = bEncrypt && (pachTargetClientHashORKadID != null || (bKad && nReceiverVerifyKey != 0)); newpending.bKad = bKad; newpending.nReceiverVerifyKey = nReceiverVerifyKey; if (newpending.bEncrypt && pachTargetClientHashORKadID != null) { MpdUtilities.Md4Cpy(newpending.pachTargetClientHashORKadID, pachTargetClientHashORKadID); } else { MpdUtilities.Md4Clr(newpending.pachTargetClientHashORKadID); } lock (sendLocker_) { controlpacketQueue_.Add(newpending); }// sendLocker.Unlock(); MuleApplication.Instance.UploadBandwidthThrottler.QueueForSendingControlPacket(this); return(true); }
public DeadSource(uint dwID, ushort nPort, uint dwServerIP, ushort nKadPort) { id_ = dwID; serverIP_ = dwServerIP; port_ = nPort; kadPort_ = nKadPort; MpdUtilities.Md4Clr(hash_); }
public MapSKey(byte[] key) { if (key != null) { MpdUtilities.Md4Cpy(key_, key); } else { MpdUtilities.Md4Clr(key_); } }
protected FileIdentifierBaseImpl() { MpdUtilities.Md4Clr(md4Hash_); HasAICHHash = false; }