LoginServer should also use the Network.ini configuration file.
This commit is contained in:
@ -816,9 +816,9 @@ public class Config
|
||||
public static boolean PACKET_FLOOD_DISCONNECT;
|
||||
public static boolean PACKET_FLOOD_DROP;
|
||||
public static boolean PACKET_FLOOD_LOGGED;
|
||||
public static boolean TCP_NO_DELAY;
|
||||
public static boolean PACKET_ENCRYPTION;
|
||||
public static boolean FAILED_DECRYPTION_LOGGED;
|
||||
public static boolean TCP_NO_DELAY;
|
||||
|
||||
// --------------------------------------------------
|
||||
// Hardin (Agent of Chaos)
|
||||
@ -1513,9 +1513,9 @@ public class Config
|
||||
PACKET_FLOOD_DISCONNECT = networkConfig.getBoolean("PacketFloodDisconnect", false);
|
||||
PACKET_FLOOD_DROP = networkConfig.getBoolean("PacketFloodDrop", false);
|
||||
PACKET_FLOOD_LOGGED = networkConfig.getBoolean("PacketFloodLogged", true);
|
||||
TCP_NO_DELAY = networkConfig.getBoolean("TcpNoDelay", true);
|
||||
PACKET_ENCRYPTION = networkConfig.getBoolean("PacketEncryption", false);
|
||||
FAILED_DECRYPTION_LOGGED = networkConfig.getBoolean("FailedDecryptionLogged", true);
|
||||
TCP_NO_DELAY = networkConfig.getBoolean("TcpNoDelay", true);
|
||||
|
||||
// Hosts and Subnets
|
||||
final IPConfigData ipcd = new IPConfigData();
|
||||
@ -3699,6 +3699,17 @@ public class Config
|
||||
MAX_CONNECTION_PER_IP = loginConfig.getInt("MaxConnectionPerIP", 50);
|
||||
ENABLE_CMD_LINE_LOGIN = loginConfig.getBoolean("EnableCmdLineLogin", false);
|
||||
ONLY_CMD_LINE_LOGIN = loginConfig.getBoolean("OnlyCmdLineLogin", false);
|
||||
|
||||
final PropertiesParser networkConfig = new PropertiesParser(NETWORK_CONFIG_FILE);
|
||||
CLIENT_READ_POOL_SIZE = networkConfig.getInt("ClientReadPoolSize", 100);
|
||||
CLIENT_SEND_POOL_SIZE = networkConfig.getInt("ClientSendPoolSize", 100);
|
||||
CLIENT_EXECUTE_POOL_SIZE = networkConfig.getInt("ClientExecutePoolSize", 100);
|
||||
PACKET_QUEUE_LIMIT = networkConfig.getInt("PacketQueueLimit", 80);
|
||||
PACKET_FLOOD_DISCONNECT = networkConfig.getBoolean("PacketFloodDisconnect", true);
|
||||
PACKET_FLOOD_DROP = networkConfig.getBoolean("PacketFloodDrop", false);
|
||||
PACKET_FLOOD_LOGGED = networkConfig.getBoolean("PacketFloodLogged", true);
|
||||
FAILED_DECRYPTION_LOGGED = networkConfig.getBoolean("FailedDecryptionLogged", false);
|
||||
TCP_NO_DELAY = networkConfig.getBoolean("TcpNoDelay", true);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -476,8 +476,8 @@ public class GameServer
|
||||
server.getNetConfig().setPacketFloodDisconnect(Config.PACKET_FLOOD_DISCONNECT);
|
||||
server.getNetConfig().setPacketFloodDrop(Config.PACKET_FLOOD_DROP);
|
||||
server.getNetConfig().setPacketFloodLogged(Config.PACKET_FLOOD_LOGGED);
|
||||
server.getNetConfig().setTcpNoDelay(Config.TCP_NO_DELAY);
|
||||
server.getNetConfig().setFailedDecryptionLogged(Config.FAILED_DECRYPTION_LOGGED);
|
||||
server.getNetConfig().setTcpNoDelay(Config.TCP_NO_DELAY);
|
||||
server.start();
|
||||
|
||||
LoginServerThread.getInstance().start();
|
||||
|
@ -135,12 +135,15 @@ public class LoginServer
|
||||
|
||||
final NetServer<LoginClient> server = new NetServer<>(Config.LOGIN_BIND_ADDRESS, Config.PORT_LOGIN, new LoginPacketHandler(), LoginClient::new);
|
||||
server.setName(getClass().getSimpleName());
|
||||
server.getNetConfig().setReadPoolSize(2000);
|
||||
server.getNetConfig().setSendPoolSize(2000);
|
||||
server.getNetConfig().setExecutePoolSize(2000);
|
||||
server.getNetConfig().setPacketQueueLimit(10);
|
||||
server.getNetConfig().setPacketFloodDisconnect(true);
|
||||
server.getNetConfig().setFailedDecryptionLogged(false);
|
||||
server.getNetConfig().setReadPoolSize(Config.CLIENT_READ_POOL_SIZE);
|
||||
server.getNetConfig().setSendPoolSize(Config.CLIENT_SEND_POOL_SIZE);
|
||||
server.getNetConfig().setExecutePoolSize(Config.CLIENT_EXECUTE_POOL_SIZE);
|
||||
server.getNetConfig().setPacketQueueLimit(Config.PACKET_QUEUE_LIMIT);
|
||||
server.getNetConfig().setPacketFloodDisconnect(Config.PACKET_FLOOD_DISCONNECT);
|
||||
server.getNetConfig().setPacketFloodDrop(Config.PACKET_FLOOD_DROP);
|
||||
server.getNetConfig().setPacketFloodLogged(Config.PACKET_FLOOD_LOGGED);
|
||||
server.getNetConfig().setFailedDecryptionLogged(Config.FAILED_DECRYPTION_LOGGED);
|
||||
server.getNetConfig().setTcpNoDelay(Config.TCP_NO_DELAY);
|
||||
server.start();
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user