Esempio n. 1
0
        public Contact()
        {
            m_uClientID  = UInt128.Zero;
            m_uIp        = 0;
            UDPPort      = 0;
            TCPPort      = 0;
            Version      = 0;
            UDPKey       = new KadUDPKey(0, 0);
            IsIpVerified = false;

            InitContact();
        }
Esempio n. 2
0
        public Contact(UInt128 uClientID, uint uIp, ushort uUdpPort, ushort uTcpPort, UInt128 uTarget, byte uVersion, KadUDPKey cUDPKey, bool bIPVerified)
        {
            m_uClientID = uClientID;
            m_uDistance = new UInt128(uTarget.High, uTarget.Low);
            m_uDistance.Xor(uClientID);
            m_uIp        = uIp;
            UDPPort      = uUdpPort;
            TCPPort      = uTcpPort;
            Version      = uVersion;
            UDPKey       = cUDPKey;
            IsIpVerified = bIPVerified;

            InitContact();
        }
Esempio n. 3
0
        public Contact(UInt128 uClientID, uint uIp, ushort uUdpPort, ushort uTcpPort, byte uVersion, KadUDPKey cUDPKey, bool bIPVerified)
        {
            m_uClientID = uClientID;
            Kademlia.GetPrefs().GetKadID(ref m_uDistance);
            m_uDistance.Xor(uClientID);
            m_uIp        = uIp;
            UDPPort      = uUdpPort;
            TCPPort      = uTcpPort;
            Version      = uVersion;
            UDPKey       = cUDPKey;
            IsIpVerified = bIPVerified;

            InitContact();
        }
Esempio n. 4
0
 public void ProcessPacket(byte[] pbyData,
                           uint uIP, ushort uPort, bool bValidReceiverKey, KadUDPKey senderUDPKey)
 {
     ProcessPacket(pbyData, 0, (uint)pbyData.Length,
                   uIP, uPort, bValidReceiverKey, senderUDPKey);
 }
Esempio n. 5
0
 public void ProcessPacket(byte[] pbyData, uint offset, uint size,
                           uint uIP, ushort uPort, bool bValidReceiverKey, KadUDPKey senderUDPKey)
 {
     throw new NotImplementedException();
 }
Esempio n. 6
0
 public static void ProcessPacket(byte pbyData, uint uLenData, uint uIP, ushort uPort, bool bValidReceiverKey, KadUDPKey senderUDPKey)
 {
     if (m_pInstance != null && m_pInstance.m_pUDPListener != null)
     {
         m_pInstance.m_pUDPListener.ProcessPacket(pbyData, uLenData, uIP, uPort, bValidReceiverKey, senderUDPKey);
     }
 }