private static ActionInnocence.P2PScan.PeerCollection getAlternateLocationsFromQueryHit(G2PacketQH2 qh2) { G2Packet pack = qh2.getFirstChildPacket(G2PacketType.ALT); if (pack == null) { return(null); } G2PacketALT altPack = pack as G2PacketALT; ActionInnocence.P2PScan.PeerCollection coll = new ActionInnocence.P2PScan.PeerCollection(); foreach (NodeAddress add in altPack.Addresses) { coll.Add(new ActionInnocence.P2PScan.Peer(add.ipv4.ToString(), add.ToString(), add.port, "")); } return(coll); }
private G2Peer(String ip, String id, int port, String nickname) : base(ip, id, port, nickname) { AlternatePeers = null; }