protected virtual List <byte> GenerateServerInfoHeader(GameServer server) { // you will only have HasKeysFlag or HasFullRule you can not have both List <byte> header = new List <byte>(); //add has key flag header.Add((byte)GameServerFlags.HasFullRulesFlag); //we add server public ip here header.AddRange(ByteTools.GetIPBytes(server.RemoteIP)); //we check host port is standard port or not CheckNonStandardPort(header, server); // now we check if there are private ip CheckPrivateIP(header, server); // we check private port here CheckPrivatePort(header, server); //TODO we have to check icmp_ip_flag CheckICMPSupport(header, server); return(header); }
protected virtual void GenerateServerInfoHeader(List <byte> header, GameServer server) { //add has key flag header.Add((byte)GameServerFlags.HasKeysFlag); //we add server public ip here header.AddRange(ByteTools.GetIPBytes(server.RemoteQueryReportIP)); //we check host port is standard port or not CheckNonStandardPort(header, server); // now we check if there are private ip CheckPrivateIP(header, server); // we check private port here CheckPrivatePort(header, server); //we check icmp support here CheckICMPSupport(header, server); }