示例#1
0
        public static ProxyUpdate Decode(G2ReceivedPacket packet)
        {
            ProxyUpdate update = new ProxyUpdate();

            G2Header child = new G2Header(packet.Root.Data);

            while (G2Protocol.ReadNextChild(packet.Root, child) == G2ReadResult.PACKET_GOOD)
            {
                if (!G2Protocol.ReadPayload(child))
                {
                    continue;
                }

                switch (child.Name)
                {
                case Packet_Proxy:
                    update.Proxy = DhtAddress.ReadPacket(child);
                    break;
                }
            }

            return(update);
        }
示例#2
0
        public static ProxyUpdate Decode(G2ReceivedPacket packet)
        {
            ProxyUpdate update = new ProxyUpdate();

            G2Header child = new G2Header(packet.Root.Data);

            while (G2Protocol.ReadNextChild(packet.Root, child) == G2ReadResult.PACKET_GOOD)
            {
                if (!G2Protocol.ReadPayload(child))
                    continue;

                switch (child.Name)
                {
                    case Packet_Proxy:
                        update.Proxy = DhtAddress.ReadPacket(child);
                        break;
                }
            }

            return update;
        }