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); }
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; }