LoginServer should also use the Network.ini configuration file.
This commit is contained in:
parent
96a579ee4a
commit
900674e177
@ -35,12 +35,6 @@ PacketFloodDrop = False
|
||||
# Default: True
|
||||
PacketFloodLogged = True
|
||||
|
||||
# Nagle's algorithm tries to conserve bandwidth by minimizing the number of segments that are sent.
|
||||
# When applications wish to decrease network latency, they can disable Nagle's algorithm (by enabling TcpNoDelay).
|
||||
# Data will be sent earlier, at the cost of an increase in bandwidth consumption.
|
||||
# Default: True (disabled)
|
||||
TcpNoDelay = True
|
||||
|
||||
# Packet encryption.
|
||||
# By default packets sent or received are encrypted using the Blowfish algorithm.
|
||||
# Disabling this reduces the resources needed to process any packets transfered,
|
||||
@ -51,3 +45,9 @@ PacketEncryption = False
|
||||
# Log message when packet decryption has failed.
|
||||
# Default: True
|
||||
FailedDecryptionLogged = True
|
||||
|
||||
# Nagle's algorithm tries to conserve bandwidth by minimizing the number of segments that are sent.
|
||||
# When applications wish to decrease network latency, they can disable Nagle's algorithm (by enabling TcpNoDelay).
|
||||
# Data will be sent earlier, at the cost of an increase in bandwidth consumption.
|
||||
# Default: True (disabled)
|
||||
TcpNoDelay = True
|
||||
|
46
L2J_Mobius_01.0_Ertheia/dist/login/config/Network.ini
vendored
Normal file
46
L2J_Mobius_01.0_Ertheia/dist/login/config/Network.ini
vendored
Normal file
@ -0,0 +1,46 @@
|
||||
# ---------------------------------------------------------------------------------------------------------------------------------
|
||||
# Network Settings
|
||||
# These settings provide fine-grained control over the network behavior and packet handling within the server application.
|
||||
# Adjusting these parameters can help optimize network performance and ensure secure communication between the server and clients.
|
||||
# ---------------------------------------------------------------------------------------------------------------------------------
|
||||
|
||||
# Client pool size for reading client packets.
|
||||
# Each pool is executed on a separate thread.
|
||||
# Default: 100
|
||||
ClientReadPoolSize = 100
|
||||
|
||||
# Client pool size for sending server packets.
|
||||
# Each pool is executed on a separate thread.
|
||||
# Default: 100
|
||||
ClientSendPoolSize = 100
|
||||
|
||||
# Client pool size for executing client packets.
|
||||
# Each pool is executed on a separate thread.
|
||||
# Default: 100
|
||||
ClientExecutePoolSize = 100
|
||||
|
||||
# Expected client packet count queued by the server.
|
||||
# Default: 80
|
||||
PacketQueueLimit = 80
|
||||
|
||||
# Disconnect client when queue has reached the queue packet limit.
|
||||
# Default: True
|
||||
PacketFloodDisconnect = True
|
||||
|
||||
# Drop packets when queue has reached the queue packet limit.
|
||||
# Default: False
|
||||
PacketFloodDrop = False
|
||||
|
||||
# Log message when queue has reached the queue packet limit.
|
||||
# Default: True
|
||||
PacketFloodLogged = True
|
||||
|
||||
# Log message when packet decryption has failed.
|
||||
# Default: False
|
||||
FailedDecryptionLogged = False
|
||||
|
||||
# Nagle's algorithm tries to conserve bandwidth by minimizing the number of segments that are sent.
|
||||
# When applications wish to decrease network latency, they can disable Nagle's algorithm (by enabling TcpNoDelay).
|
||||
# Data will be sent earlier, at the cost of an increase in bandwidth consumption.
|
||||
# Default: True (disabled)
|
||||
TcpNoDelay = True
|
@ -817,9 +817,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)
|
||||
@ -1474,9 +1474,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();
|
||||
@ -3614,6 +3614,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
|
||||
{
|
||||
|
@ -462,8 +462,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();
|
||||
}
|
||||
|
||||
|
@ -35,12 +35,6 @@ PacketFloodDrop = False
|
||||
# Default: True
|
||||
PacketFloodLogged = True
|
||||
|
||||
# Nagle's algorithm tries to conserve bandwidth by minimizing the number of segments that are sent.
|
||||
# When applications wish to decrease network latency, they can disable Nagle's algorithm (by enabling TcpNoDelay).
|
||||
# Data will be sent earlier, at the cost of an increase in bandwidth consumption.
|
||||
# Default: True (disabled)
|
||||
TcpNoDelay = True
|
||||
|
||||
# Packet encryption.
|
||||
# By default packets sent or received are encrypted using the Blowfish algorithm.
|
||||
# Disabling this reduces the resources needed to process any packets transfered,
|
||||
@ -51,3 +45,9 @@ PacketEncryption = False
|
||||
# Log message when packet decryption has failed.
|
||||
# Default: True
|
||||
FailedDecryptionLogged = True
|
||||
|
||||
# Nagle's algorithm tries to conserve bandwidth by minimizing the number of segments that are sent.
|
||||
# When applications wish to decrease network latency, they can disable Nagle's algorithm (by enabling TcpNoDelay).
|
||||
# Data will be sent earlier, at the cost of an increase in bandwidth consumption.
|
||||
# Default: True (disabled)
|
||||
TcpNoDelay = True
|
||||
|
46
L2J_Mobius_02.5_Underground/dist/login/config/Network.ini
vendored
Normal file
46
L2J_Mobius_02.5_Underground/dist/login/config/Network.ini
vendored
Normal file
@ -0,0 +1,46 @@
|
||||
# ---------------------------------------------------------------------------------------------------------------------------------
|
||||
# Network Settings
|
||||
# These settings provide fine-grained control over the network behavior and packet handling within the server application.
|
||||
# Adjusting these parameters can help optimize network performance and ensure secure communication between the server and clients.
|
||||
# ---------------------------------------------------------------------------------------------------------------------------------
|
||||
|
||||
# Client pool size for reading client packets.
|
||||
# Each pool is executed on a separate thread.
|
||||
# Default: 100
|
||||
ClientReadPoolSize = 100
|
||||
|
||||
# Client pool size for sending server packets.
|
||||
# Each pool is executed on a separate thread.
|
||||
# Default: 100
|
||||
ClientSendPoolSize = 100
|
||||
|
||||
# Client pool size for executing client packets.
|
||||
# Each pool is executed on a separate thread.
|
||||
# Default: 100
|
||||
ClientExecutePoolSize = 100
|
||||
|
||||
# Expected client packet count queued by the server.
|
||||
# Default: 80
|
||||
PacketQueueLimit = 80
|
||||
|
||||
# Disconnect client when queue has reached the queue packet limit.
|
||||
# Default: True
|
||||
PacketFloodDisconnect = True
|
||||
|
||||
# Drop packets when queue has reached the queue packet limit.
|
||||
# Default: False
|
||||
PacketFloodDrop = False
|
||||
|
||||
# Log message when queue has reached the queue packet limit.
|
||||
# Default: True
|
||||
PacketFloodLogged = True
|
||||
|
||||
# Log message when packet decryption has failed.
|
||||
# Default: False
|
||||
FailedDecryptionLogged = False
|
||||
|
||||
# Nagle's algorithm tries to conserve bandwidth by minimizing the number of segments that are sent.
|
||||
# When applications wish to decrease network latency, they can disable Nagle's algorithm (by enabling TcpNoDelay).
|
||||
# Data will be sent earlier, at the cost of an increase in bandwidth consumption.
|
||||
# Default: True (disabled)
|
||||
TcpNoDelay = True
|
@ -828,9 +828,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)
|
||||
@ -1486,9 +1486,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();
|
||||
@ -3640,6 +3640,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
|
||||
{
|
||||
|
@ -470,8 +470,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();
|
||||
}
|
||||
|
||||
|
@ -35,12 +35,6 @@ PacketFloodDrop = False
|
||||
# Default: True
|
||||
PacketFloodLogged = True
|
||||
|
||||
# Nagle's algorithm tries to conserve bandwidth by minimizing the number of segments that are sent.
|
||||
# When applications wish to decrease network latency, they can disable Nagle's algorithm (by enabling TcpNoDelay).
|
||||
# Data will be sent earlier, at the cost of an increase in bandwidth consumption.
|
||||
# Default: True (disabled)
|
||||
TcpNoDelay = True
|
||||
|
||||
# Packet encryption.
|
||||
# By default packets sent or received are encrypted using the Blowfish algorithm.
|
||||
# Disabling this reduces the resources needed to process any packets transfered,
|
||||
@ -51,3 +45,9 @@ PacketEncryption = False
|
||||
# Log message when packet decryption has failed.
|
||||
# Default: True
|
||||
FailedDecryptionLogged = True
|
||||
|
||||
# Nagle's algorithm tries to conserve bandwidth by minimizing the number of segments that are sent.
|
||||
# When applications wish to decrease network latency, they can disable Nagle's algorithm (by enabling TcpNoDelay).
|
||||
# Data will be sent earlier, at the cost of an increase in bandwidth consumption.
|
||||
# Default: True (disabled)
|
||||
TcpNoDelay = True
|
||||
|
46
L2J_Mobius_03.0_Helios/dist/login/config/Network.ini
vendored
Normal file
46
L2J_Mobius_03.0_Helios/dist/login/config/Network.ini
vendored
Normal file
@ -0,0 +1,46 @@
|
||||
# ---------------------------------------------------------------------------------------------------------------------------------
|
||||
# Network Settings
|
||||
# These settings provide fine-grained control over the network behavior and packet handling within the server application.
|
||||
# Adjusting these parameters can help optimize network performance and ensure secure communication between the server and clients.
|
||||
# ---------------------------------------------------------------------------------------------------------------------------------
|
||||
|
||||
# Client pool size for reading client packets.
|
||||
# Each pool is executed on a separate thread.
|
||||
# Default: 100
|
||||
ClientReadPoolSize = 100
|
||||
|
||||
# Client pool size for sending server packets.
|
||||
# Each pool is executed on a separate thread.
|
||||
# Default: 100
|
||||
ClientSendPoolSize = 100
|
||||
|
||||
# Client pool size for executing client packets.
|
||||
# Each pool is executed on a separate thread.
|
||||
# Default: 100
|
||||
ClientExecutePoolSize = 100
|
||||
|
||||
# Expected client packet count queued by the server.
|
||||
# Default: 80
|
||||
PacketQueueLimit = 80
|
||||
|
||||
# Disconnect client when queue has reached the queue packet limit.
|
||||
# Default: True
|
||||
PacketFloodDisconnect = True
|
||||
|
||||
# Drop packets when queue has reached the queue packet limit.
|
||||
# Default: False
|
||||
PacketFloodDrop = False
|
||||
|
||||
# Log message when queue has reached the queue packet limit.
|
||||
# Default: True
|
||||
PacketFloodLogged = True
|
||||
|
||||
# Log message when packet decryption has failed.
|
||||
# Default: False
|
||||
FailedDecryptionLogged = False
|
||||
|
||||
# Nagle's algorithm tries to conserve bandwidth by minimizing the number of segments that are sent.
|
||||
# When applications wish to decrease network latency, they can disable Nagle's algorithm (by enabling TcpNoDelay).
|
||||
# Data will be sent earlier, at the cost of an increase in bandwidth consumption.
|
||||
# Default: True (disabled)
|
||||
TcpNoDelay = True
|
@ -829,9 +829,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)
|
||||
@ -1499,9 +1499,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();
|
||||
@ -3662,6 +3662,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
|
||||
{
|
||||
|
@ -470,8 +470,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();
|
||||
}
|
||||
|
||||
|
@ -35,12 +35,6 @@ PacketFloodDrop = False
|
||||
# Default: True
|
||||
PacketFloodLogged = True
|
||||
|
||||
# Nagle's algorithm tries to conserve bandwidth by minimizing the number of segments that are sent.
|
||||
# When applications wish to decrease network latency, they can disable Nagle's algorithm (by enabling TcpNoDelay).
|
||||
# Data will be sent earlier, at the cost of an increase in bandwidth consumption.
|
||||
# Default: True (disabled)
|
||||
TcpNoDelay = True
|
||||
|
||||
# Packet encryption.
|
||||
# By default packets sent or received are encrypted using the Blowfish algorithm.
|
||||
# Disabling this reduces the resources needed to process any packets transfered,
|
||||
@ -51,3 +45,9 @@ PacketEncryption = False
|
||||
# Log message when packet decryption has failed.
|
||||
# Default: True
|
||||
FailedDecryptionLogged = True
|
||||
|
||||
# Nagle's algorithm tries to conserve bandwidth by minimizing the number of segments that are sent.
|
||||
# When applications wish to decrease network latency, they can disable Nagle's algorithm (by enabling TcpNoDelay).
|
||||
# Data will be sent earlier, at the cost of an increase in bandwidth consumption.
|
||||
# Default: True (disabled)
|
||||
TcpNoDelay = True
|
||||
|
46
L2J_Mobius_04.0_GrandCrusade/dist/login/config/Network.ini
vendored
Normal file
46
L2J_Mobius_04.0_GrandCrusade/dist/login/config/Network.ini
vendored
Normal file
@ -0,0 +1,46 @@
|
||||
# ---------------------------------------------------------------------------------------------------------------------------------
|
||||
# Network Settings
|
||||
# These settings provide fine-grained control over the network behavior and packet handling within the server application.
|
||||
# Adjusting these parameters can help optimize network performance and ensure secure communication between the server and clients.
|
||||
# ---------------------------------------------------------------------------------------------------------------------------------
|
||||
|
||||
# Client pool size for reading client packets.
|
||||
# Each pool is executed on a separate thread.
|
||||
# Default: 100
|
||||
ClientReadPoolSize = 100
|
||||
|
||||
# Client pool size for sending server packets.
|
||||
# Each pool is executed on a separate thread.
|
||||
# Default: 100
|
||||
ClientSendPoolSize = 100
|
||||
|
||||
# Client pool size for executing client packets.
|
||||
# Each pool is executed on a separate thread.
|
||||
# Default: 100
|
||||
ClientExecutePoolSize = 100
|
||||
|
||||
# Expected client packet count queued by the server.
|
||||
# Default: 80
|
||||
PacketQueueLimit = 80
|
||||
|
||||
# Disconnect client when queue has reached the queue packet limit.
|
||||
# Default: True
|
||||
PacketFloodDisconnect = True
|
||||
|
||||
# Drop packets when queue has reached the queue packet limit.
|
||||
# Default: False
|
||||
PacketFloodDrop = False
|
||||
|
||||
# Log message when queue has reached the queue packet limit.
|
||||
# Default: True
|
||||
PacketFloodLogged = True
|
||||
|
||||
# Log message when packet decryption has failed.
|
||||
# Default: False
|
||||
FailedDecryptionLogged = False
|
||||
|
||||
# Nagle's algorithm tries to conserve bandwidth by minimizing the number of segments that are sent.
|
||||
# When applications wish to decrease network latency, they can disable Nagle's algorithm (by enabling TcpNoDelay).
|
||||
# Data will be sent earlier, at the cost of an increase in bandwidth consumption.
|
||||
# Default: True (disabled)
|
||||
TcpNoDelay = True
|
@ -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)
|
||||
@ -1486,9 +1486,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();
|
||||
@ -3636,6 +3636,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
|
||||
{
|
||||
|
@ -470,8 +470,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();
|
||||
}
|
||||
|
||||
|
@ -35,12 +35,6 @@ PacketFloodDrop = False
|
||||
# Default: True
|
||||
PacketFloodLogged = True
|
||||
|
||||
# Nagle's algorithm tries to conserve bandwidth by minimizing the number of segments that are sent.
|
||||
# When applications wish to decrease network latency, they can disable Nagle's algorithm (by enabling TcpNoDelay).
|
||||
# Data will be sent earlier, at the cost of an increase in bandwidth consumption.
|
||||
# Default: True (disabled)
|
||||
TcpNoDelay = True
|
||||
|
||||
# Packet encryption.
|
||||
# By default packets sent or received are encrypted using the Blowfish algorithm.
|
||||
# Disabling this reduces the resources needed to process any packets transfered,
|
||||
@ -51,3 +45,9 @@ PacketEncryption = False
|
||||
# Log message when packet decryption has failed.
|
||||
# Default: True
|
||||
FailedDecryptionLogged = True
|
||||
|
||||
# Nagle's algorithm tries to conserve bandwidth by minimizing the number of segments that are sent.
|
||||
# When applications wish to decrease network latency, they can disable Nagle's algorithm (by enabling TcpNoDelay).
|
||||
# Data will be sent earlier, at the cost of an increase in bandwidth consumption.
|
||||
# Default: True (disabled)
|
||||
TcpNoDelay = True
|
||||
|
46
L2J_Mobius_05.0_Salvation/dist/login/config/Network.ini
vendored
Normal file
46
L2J_Mobius_05.0_Salvation/dist/login/config/Network.ini
vendored
Normal file
@ -0,0 +1,46 @@
|
||||
# ---------------------------------------------------------------------------------------------------------------------------------
|
||||
# Network Settings
|
||||
# These settings provide fine-grained control over the network behavior and packet handling within the server application.
|
||||
# Adjusting these parameters can help optimize network performance and ensure secure communication between the server and clients.
|
||||
# ---------------------------------------------------------------------------------------------------------------------------------
|
||||
|
||||
# Client pool size for reading client packets.
|
||||
# Each pool is executed on a separate thread.
|
||||
# Default: 100
|
||||
ClientReadPoolSize = 100
|
||||
|
||||
# Client pool size for sending server packets.
|
||||
# Each pool is executed on a separate thread.
|
||||
# Default: 100
|
||||
ClientSendPoolSize = 100
|
||||
|
||||
# Client pool size for executing client packets.
|
||||
# Each pool is executed on a separate thread.
|
||||
# Default: 100
|
||||
ClientExecutePoolSize = 100
|
||||
|
||||
# Expected client packet count queued by the server.
|
||||
# Default: 80
|
||||
PacketQueueLimit = 80
|
||||
|
||||
# Disconnect client when queue has reached the queue packet limit.
|
||||
# Default: True
|
||||
PacketFloodDisconnect = True
|
||||
|
||||
# Drop packets when queue has reached the queue packet limit.
|
||||
# Default: False
|
||||
PacketFloodDrop = False
|
||||
|
||||
# Log message when queue has reached the queue packet limit.
|
||||
# Default: True
|
||||
PacketFloodLogged = True
|
||||
|
||||
# Log message when packet decryption has failed.
|
||||
# Default: False
|
||||
FailedDecryptionLogged = False
|
||||
|
||||
# Nagle's algorithm tries to conserve bandwidth by minimizing the number of segments that are sent.
|
||||
# When applications wish to decrease network latency, they can disable Nagle's algorithm (by enabling TcpNoDelay).
|
||||
# Data will be sent earlier, at the cost of an increase in bandwidth consumption.
|
||||
# Default: True (disabled)
|
||||
TcpNoDelay = True
|
@ -815,9 +815,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)
|
||||
@ -1485,9 +1485,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();
|
||||
@ -3645,6 +3645,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
|
||||
{
|
||||
|
@ -474,8 +474,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();
|
||||
}
|
||||
|
||||
|
@ -35,12 +35,6 @@ PacketFloodDrop = False
|
||||
# Default: True
|
||||
PacketFloodLogged = True
|
||||
|
||||
# Nagle's algorithm tries to conserve bandwidth by minimizing the number of segments that are sent.
|
||||
# When applications wish to decrease network latency, they can disable Nagle's algorithm (by enabling TcpNoDelay).
|
||||
# Data will be sent earlier, at the cost of an increase in bandwidth consumption.
|
||||
# Default: True (disabled)
|
||||
TcpNoDelay = True
|
||||
|
||||
# Packet encryption.
|
||||
# By default packets sent or received are encrypted using the Blowfish algorithm.
|
||||
# Disabling this reduces the resources needed to process any packets transfered,
|
||||
@ -51,3 +45,9 @@ PacketEncryption = False
|
||||
# Log message when packet decryption has failed.
|
||||
# Default: True
|
||||
FailedDecryptionLogged = True
|
||||
|
||||
# Nagle's algorithm tries to conserve bandwidth by minimizing the number of segments that are sent.
|
||||
# When applications wish to decrease network latency, they can disable Nagle's algorithm (by enabling TcpNoDelay).
|
||||
# Data will be sent earlier, at the cost of an increase in bandwidth consumption.
|
||||
# Default: True (disabled)
|
||||
TcpNoDelay = True
|
||||
|
46
L2J_Mobius_05.5_EtinasFate/dist/login/config/Network.ini
vendored
Normal file
46
L2J_Mobius_05.5_EtinasFate/dist/login/config/Network.ini
vendored
Normal file
@ -0,0 +1,46 @@
|
||||
# ---------------------------------------------------------------------------------------------------------------------------------
|
||||
# Network Settings
|
||||
# These settings provide fine-grained control over the network behavior and packet handling within the server application.
|
||||
# Adjusting these parameters can help optimize network performance and ensure secure communication between the server and clients.
|
||||
# ---------------------------------------------------------------------------------------------------------------------------------
|
||||
|
||||
# Client pool size for reading client packets.
|
||||
# Each pool is executed on a separate thread.
|
||||
# Default: 100
|
||||
ClientReadPoolSize = 100
|
||||
|
||||
# Client pool size for sending server packets.
|
||||
# Each pool is executed on a separate thread.
|
||||
# Default: 100
|
||||
ClientSendPoolSize = 100
|
||||
|
||||
# Client pool size for executing client packets.
|
||||
# Each pool is executed on a separate thread.
|
||||
# Default: 100
|
||||
ClientExecutePoolSize = 100
|
||||
|
||||
# Expected client packet count queued by the server.
|
||||
# Default: 80
|
||||
PacketQueueLimit = 80
|
||||
|
||||
# Disconnect client when queue has reached the queue packet limit.
|
||||
# Default: True
|
||||
PacketFloodDisconnect = True
|
||||
|
||||
# Drop packets when queue has reached the queue packet limit.
|
||||
# Default: False
|
||||
PacketFloodDrop = False
|
||||
|
||||
# Log message when queue has reached the queue packet limit.
|
||||
# Default: True
|
||||
PacketFloodLogged = True
|
||||
|
||||
# Log message when packet decryption has failed.
|
||||
# Default: False
|
||||
FailedDecryptionLogged = False
|
||||
|
||||
# Nagle's algorithm tries to conserve bandwidth by minimizing the number of segments that are sent.
|
||||
# When applications wish to decrease network latency, they can disable Nagle's algorithm (by enabling TcpNoDelay).
|
||||
# Data will be sent earlier, at the cost of an increase in bandwidth consumption.
|
||||
# Default: True (disabled)
|
||||
TcpNoDelay = True
|
@ -815,9 +815,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)
|
||||
@ -1492,9 +1492,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();
|
||||
@ -3657,6 +3657,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
|
||||
{
|
||||
|
@ -474,8 +474,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();
|
||||
}
|
||||
|
||||
|
@ -35,12 +35,6 @@ PacketFloodDrop = False
|
||||
# Default: True
|
||||
PacketFloodLogged = True
|
||||
|
||||
# Nagle's algorithm tries to conserve bandwidth by minimizing the number of segments that are sent.
|
||||
# When applications wish to decrease network latency, they can disable Nagle's algorithm (by enabling TcpNoDelay).
|
||||
# Data will be sent earlier, at the cost of an increase in bandwidth consumption.
|
||||
# Default: True (disabled)
|
||||
TcpNoDelay = True
|
||||
|
||||
# Packet encryption.
|
||||
# By default packets sent or received are encrypted using the Blowfish algorithm.
|
||||
# Disabling this reduces the resources needed to process any packets transfered,
|
||||
@ -51,3 +45,9 @@ PacketEncryption = False
|
||||
# Log message when packet decryption has failed.
|
||||
# Default: True
|
||||
FailedDecryptionLogged = True
|
||||
|
||||
# Nagle's algorithm tries to conserve bandwidth by minimizing the number of segments that are sent.
|
||||
# When applications wish to decrease network latency, they can disable Nagle's algorithm (by enabling TcpNoDelay).
|
||||
# Data will be sent earlier, at the cost of an increase in bandwidth consumption.
|
||||
# Default: True (disabled)
|
||||
TcpNoDelay = True
|
||||
|
46
L2J_Mobius_06.0_Fafurion/dist/login/config/Network.ini
vendored
Normal file
46
L2J_Mobius_06.0_Fafurion/dist/login/config/Network.ini
vendored
Normal file
@ -0,0 +1,46 @@
|
||||
# ---------------------------------------------------------------------------------------------------------------------------------
|
||||
# Network Settings
|
||||
# These settings provide fine-grained control over the network behavior and packet handling within the server application.
|
||||
# Adjusting these parameters can help optimize network performance and ensure secure communication between the server and clients.
|
||||
# ---------------------------------------------------------------------------------------------------------------------------------
|
||||
|
||||
# Client pool size for reading client packets.
|
||||
# Each pool is executed on a separate thread.
|
||||
# Default: 100
|
||||
ClientReadPoolSize = 100
|
||||
|
||||
# Client pool size for sending server packets.
|
||||
# Each pool is executed on a separate thread.
|
||||
# Default: 100
|
||||
ClientSendPoolSize = 100
|
||||
|
||||
# Client pool size for executing client packets.
|
||||
# Each pool is executed on a separate thread.
|
||||
# Default: 100
|
||||
ClientExecutePoolSize = 100
|
||||
|
||||
# Expected client packet count queued by the server.
|
||||
# Default: 80
|
||||
PacketQueueLimit = 80
|
||||
|
||||
# Disconnect client when queue has reached the queue packet limit.
|
||||
# Default: True
|
||||
PacketFloodDisconnect = True
|
||||
|
||||
# Drop packets when queue has reached the queue packet limit.
|
||||
# Default: False
|
||||
PacketFloodDrop = False
|
||||
|
||||
# Log message when queue has reached the queue packet limit.
|
||||
# Default: True
|
||||
PacketFloodLogged = True
|
||||
|
||||
# Log message when packet decryption has failed.
|
||||
# Default: False
|
||||
FailedDecryptionLogged = False
|
||||
|
||||
# Nagle's algorithm tries to conserve bandwidth by minimizing the number of segments that are sent.
|
||||
# When applications wish to decrease network latency, they can disable Nagle's algorithm (by enabling TcpNoDelay).
|
||||
# Data will be sent earlier, at the cost of an increase in bandwidth consumption.
|
||||
# Default: True (disabled)
|
||||
TcpNoDelay = True
|
@ -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();
|
||||
}
|
||||
|
||||
|
@ -35,12 +35,6 @@ PacketFloodDrop = False
|
||||
# Default: True
|
||||
PacketFloodLogged = True
|
||||
|
||||
# Nagle's algorithm tries to conserve bandwidth by minimizing the number of segments that are sent.
|
||||
# When applications wish to decrease network latency, they can disable Nagle's algorithm (by enabling TcpNoDelay).
|
||||
# Data will be sent earlier, at the cost of an increase in bandwidth consumption.
|
||||
# Default: True (disabled)
|
||||
TcpNoDelay = True
|
||||
|
||||
# Packet encryption.
|
||||
# By default packets sent or received are encrypted using the Blowfish algorithm.
|
||||
# Disabling this reduces the resources needed to process any packets transfered,
|
||||
@ -51,3 +45,9 @@ PacketEncryption = False
|
||||
# Log message when packet decryption has failed.
|
||||
# Default: True
|
||||
FailedDecryptionLogged = True
|
||||
|
||||
# Nagle's algorithm tries to conserve bandwidth by minimizing the number of segments that are sent.
|
||||
# When applications wish to decrease network latency, they can disable Nagle's algorithm (by enabling TcpNoDelay).
|
||||
# Data will be sent earlier, at the cost of an increase in bandwidth consumption.
|
||||
# Default: True (disabled)
|
||||
TcpNoDelay = True
|
||||
|
46
L2J_Mobius_07.0_PreludeOfWar/dist/login/config/Network.ini
vendored
Normal file
46
L2J_Mobius_07.0_PreludeOfWar/dist/login/config/Network.ini
vendored
Normal file
@ -0,0 +1,46 @@
|
||||
# ---------------------------------------------------------------------------------------------------------------------------------
|
||||
# Network Settings
|
||||
# These settings provide fine-grained control over the network behavior and packet handling within the server application.
|
||||
# Adjusting these parameters can help optimize network performance and ensure secure communication between the server and clients.
|
||||
# ---------------------------------------------------------------------------------------------------------------------------------
|
||||
|
||||
# Client pool size for reading client packets.
|
||||
# Each pool is executed on a separate thread.
|
||||
# Default: 100
|
||||
ClientReadPoolSize = 100
|
||||
|
||||
# Client pool size for sending server packets.
|
||||
# Each pool is executed on a separate thread.
|
||||
# Default: 100
|
||||
ClientSendPoolSize = 100
|
||||
|
||||
# Client pool size for executing client packets.
|
||||
# Each pool is executed on a separate thread.
|
||||
# Default: 100
|
||||
ClientExecutePoolSize = 100
|
||||
|
||||
# Expected client packet count queued by the server.
|
||||
# Default: 80
|
||||
PacketQueueLimit = 80
|
||||
|
||||
# Disconnect client when queue has reached the queue packet limit.
|
||||
# Default: True
|
||||
PacketFloodDisconnect = True
|
||||
|
||||
# Drop packets when queue has reached the queue packet limit.
|
||||
# Default: False
|
||||
PacketFloodDrop = False
|
||||
|
||||
# Log message when queue has reached the queue packet limit.
|
||||
# Default: True
|
||||
PacketFloodLogged = True
|
||||
|
||||
# Log message when packet decryption has failed.
|
||||
# Default: False
|
||||
FailedDecryptionLogged = False
|
||||
|
||||
# Nagle's algorithm tries to conserve bandwidth by minimizing the number of segments that are sent.
|
||||
# When applications wish to decrease network latency, they can disable Nagle's algorithm (by enabling TcpNoDelay).
|
||||
# Data will be sent earlier, at the cost of an increase in bandwidth consumption.
|
||||
# Default: True (disabled)
|
||||
TcpNoDelay = True
|
@ -822,9 +822,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)
|
||||
@ -1521,9 +1521,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();
|
||||
@ -3715,6 +3715,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
|
||||
{
|
||||
|
@ -482,8 +482,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();
|
||||
}
|
||||
|
||||
|
@ -35,12 +35,6 @@ PacketFloodDrop = False
|
||||
# Default: True
|
||||
PacketFloodLogged = True
|
||||
|
||||
# Nagle's algorithm tries to conserve bandwidth by minimizing the number of segments that are sent.
|
||||
# When applications wish to decrease network latency, they can disable Nagle's algorithm (by enabling TcpNoDelay).
|
||||
# Data will be sent earlier, at the cost of an increase in bandwidth consumption.
|
||||
# Default: True (disabled)
|
||||
TcpNoDelay = True
|
||||
|
||||
# Packet encryption.
|
||||
# By default packets sent or received are encrypted using the Blowfish algorithm.
|
||||
# Disabling this reduces the resources needed to process any packets transfered,
|
||||
@ -51,3 +45,9 @@ PacketEncryption = False
|
||||
# Log message when packet decryption has failed.
|
||||
# Default: True
|
||||
FailedDecryptionLogged = True
|
||||
|
||||
# Nagle's algorithm tries to conserve bandwidth by minimizing the number of segments that are sent.
|
||||
# When applications wish to decrease network latency, they can disable Nagle's algorithm (by enabling TcpNoDelay).
|
||||
# Data will be sent earlier, at the cost of an increase in bandwidth consumption.
|
||||
# Default: True (disabled)
|
||||
TcpNoDelay = True
|
||||
|
46
L2J_Mobius_08.2_Homunculus/dist/login/config/Network.ini
vendored
Normal file
46
L2J_Mobius_08.2_Homunculus/dist/login/config/Network.ini
vendored
Normal file
@ -0,0 +1,46 @@
|
||||
# ---------------------------------------------------------------------------------------------------------------------------------
|
||||
# Network Settings
|
||||
# These settings provide fine-grained control over the network behavior and packet handling within the server application.
|
||||
# Adjusting these parameters can help optimize network performance and ensure secure communication between the server and clients.
|
||||
# ---------------------------------------------------------------------------------------------------------------------------------
|
||||
|
||||
# Client pool size for reading client packets.
|
||||
# Each pool is executed on a separate thread.
|
||||
# Default: 100
|
||||
ClientReadPoolSize = 100
|
||||
|
||||
# Client pool size for sending server packets.
|
||||
# Each pool is executed on a separate thread.
|
||||
# Default: 100
|
||||
ClientSendPoolSize = 100
|
||||
|
||||
# Client pool size for executing client packets.
|
||||
# Each pool is executed on a separate thread.
|
||||
# Default: 100
|
||||
ClientExecutePoolSize = 100
|
||||
|
||||
# Expected client packet count queued by the server.
|
||||
# Default: 80
|
||||
PacketQueueLimit = 80
|
||||
|
||||
# Disconnect client when queue has reached the queue packet limit.
|
||||
# Default: True
|
||||
PacketFloodDisconnect = True
|
||||
|
||||
# Drop packets when queue has reached the queue packet limit.
|
||||
# Default: False
|
||||
PacketFloodDrop = False
|
||||
|
||||
# Log message when queue has reached the queue packet limit.
|
||||
# Default: True
|
||||
PacketFloodLogged = True
|
||||
|
||||
# Log message when packet decryption has failed.
|
||||
# Default: False
|
||||
FailedDecryptionLogged = False
|
||||
|
||||
# Nagle's algorithm tries to conserve bandwidth by minimizing the number of segments that are sent.
|
||||
# When applications wish to decrease network latency, they can disable Nagle's algorithm (by enabling TcpNoDelay).
|
||||
# Data will be sent earlier, at the cost of an increase in bandwidth consumption.
|
||||
# Default: True (disabled)
|
||||
TcpNoDelay = True
|
@ -813,9 +813,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)
|
||||
@ -1512,9 +1512,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();
|
||||
@ -3690,6 +3690,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
|
||||
{
|
||||
|
@ -486,8 +486,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();
|
||||
}
|
||||
|
||||
|
@ -35,12 +35,6 @@ PacketFloodDrop = False
|
||||
# Default: True
|
||||
PacketFloodLogged = True
|
||||
|
||||
# Nagle's algorithm tries to conserve bandwidth by minimizing the number of segments that are sent.
|
||||
# When applications wish to decrease network latency, they can disable Nagle's algorithm (by enabling TcpNoDelay).
|
||||
# Data will be sent earlier, at the cost of an increase in bandwidth consumption.
|
||||
# Default: True (disabled)
|
||||
TcpNoDelay = True
|
||||
|
||||
# Packet encryption.
|
||||
# By default packets sent or received are encrypted using the Blowfish algorithm.
|
||||
# Disabling this reduces the resources needed to process any packets transfered,
|
||||
@ -51,3 +45,9 @@ PacketEncryption = False
|
||||
# Log message when packet decryption has failed.
|
||||
# Default: True
|
||||
FailedDecryptionLogged = True
|
||||
|
||||
# Nagle's algorithm tries to conserve bandwidth by minimizing the number of segments that are sent.
|
||||
# When applications wish to decrease network latency, they can disable Nagle's algorithm (by enabling TcpNoDelay).
|
||||
# Data will be sent earlier, at the cost of an increase in bandwidth consumption.
|
||||
# Default: True (disabled)
|
||||
TcpNoDelay = True
|
||||
|
46
L2J_Mobius_09.2_ReturnOfTheQueenAnt/dist/login/config/Network.ini
vendored
Normal file
46
L2J_Mobius_09.2_ReturnOfTheQueenAnt/dist/login/config/Network.ini
vendored
Normal file
@ -0,0 +1,46 @@
|
||||
# ---------------------------------------------------------------------------------------------------------------------------------
|
||||
# Network Settings
|
||||
# These settings provide fine-grained control over the network behavior and packet handling within the server application.
|
||||
# Adjusting these parameters can help optimize network performance and ensure secure communication between the server and clients.
|
||||
# ---------------------------------------------------------------------------------------------------------------------------------
|
||||
|
||||
# Client pool size for reading client packets.
|
||||
# Each pool is executed on a separate thread.
|
||||
# Default: 100
|
||||
ClientReadPoolSize = 100
|
||||
|
||||
# Client pool size for sending server packets.
|
||||
# Each pool is executed on a separate thread.
|
||||
# Default: 100
|
||||
ClientSendPoolSize = 100
|
||||
|
||||
# Client pool size for executing client packets.
|
||||
# Each pool is executed on a separate thread.
|
||||
# Default: 100
|
||||
ClientExecutePoolSize = 100
|
||||
|
||||
# Expected client packet count queued by the server.
|
||||
# Default: 80
|
||||
PacketQueueLimit = 80
|
||||
|
||||
# Disconnect client when queue has reached the queue packet limit.
|
||||
# Default: True
|
||||
PacketFloodDisconnect = True
|
||||
|
||||
# Drop packets when queue has reached the queue packet limit.
|
||||
# Default: False
|
||||
PacketFloodDrop = False
|
||||
|
||||
# Log message when queue has reached the queue packet limit.
|
||||
# Default: True
|
||||
PacketFloodLogged = True
|
||||
|
||||
# Log message when packet decryption has failed.
|
||||
# Default: False
|
||||
FailedDecryptionLogged = False
|
||||
|
||||
# Nagle's algorithm tries to conserve bandwidth by minimizing the number of segments that are sent.
|
||||
# When applications wish to decrease network latency, they can disable Nagle's algorithm (by enabling TcpNoDelay).
|
||||
# Data will be sent earlier, at the cost of an increase in bandwidth consumption.
|
||||
# Default: True (disabled)
|
||||
TcpNoDelay = True
|
@ -813,9 +813,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)
|
||||
@ -1514,9 +1514,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();
|
||||
@ -3694,6 +3694,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
|
||||
{
|
||||
|
@ -490,8 +490,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();
|
||||
}
|
||||
|
||||
|
@ -35,12 +35,6 @@ PacketFloodDrop = False
|
||||
# Default: True
|
||||
PacketFloodLogged = True
|
||||
|
||||
# Nagle's algorithm tries to conserve bandwidth by minimizing the number of segments that are sent.
|
||||
# When applications wish to decrease network latency, they can disable Nagle's algorithm (by enabling TcpNoDelay).
|
||||
# Data will be sent earlier, at the cost of an increase in bandwidth consumption.
|
||||
# Default: True (disabled)
|
||||
TcpNoDelay = True
|
||||
|
||||
# Packet encryption.
|
||||
# By default packets sent or received are encrypted using the Blowfish algorithm.
|
||||
# Disabling this reduces the resources needed to process any packets transfered,
|
||||
@ -51,3 +45,9 @@ PacketEncryption = False
|
||||
# Log message when packet decryption has failed.
|
||||
# Default: True
|
||||
FailedDecryptionLogged = True
|
||||
|
||||
# Nagle's algorithm tries to conserve bandwidth by minimizing the number of segments that are sent.
|
||||
# When applications wish to decrease network latency, they can disable Nagle's algorithm (by enabling TcpNoDelay).
|
||||
# Data will be sent earlier, at the cost of an increase in bandwidth consumption.
|
||||
# Default: True (disabled)
|
||||
TcpNoDelay = True
|
||||
|
46
L2J_Mobius_10.2_MasterClass/dist/login/config/Network.ini
vendored
Normal file
46
L2J_Mobius_10.2_MasterClass/dist/login/config/Network.ini
vendored
Normal file
@ -0,0 +1,46 @@
|
||||
# ---------------------------------------------------------------------------------------------------------------------------------
|
||||
# Network Settings
|
||||
# These settings provide fine-grained control over the network behavior and packet handling within the server application.
|
||||
# Adjusting these parameters can help optimize network performance and ensure secure communication between the server and clients.
|
||||
# ---------------------------------------------------------------------------------------------------------------------------------
|
||||
|
||||
# Client pool size for reading client packets.
|
||||
# Each pool is executed on a separate thread.
|
||||
# Default: 100
|
||||
ClientReadPoolSize = 100
|
||||
|
||||
# Client pool size for sending server packets.
|
||||
# Each pool is executed on a separate thread.
|
||||
# Default: 100
|
||||
ClientSendPoolSize = 100
|
||||
|
||||
# Client pool size for executing client packets.
|
||||
# Each pool is executed on a separate thread.
|
||||
# Default: 100
|
||||
ClientExecutePoolSize = 100
|
||||
|
||||
# Expected client packet count queued by the server.
|
||||
# Default: 80
|
||||
PacketQueueLimit = 80
|
||||
|
||||
# Disconnect client when queue has reached the queue packet limit.
|
||||
# Default: True
|
||||
PacketFloodDisconnect = True
|
||||
|
||||
# Drop packets when queue has reached the queue packet limit.
|
||||
# Default: False
|
||||
PacketFloodDrop = False
|
||||
|
||||
# Log message when queue has reached the queue packet limit.
|
||||
# Default: True
|
||||
PacketFloodLogged = True
|
||||
|
||||
# Log message when packet decryption has failed.
|
||||
# Default: False
|
||||
FailedDecryptionLogged = False
|
||||
|
||||
# Nagle's algorithm tries to conserve bandwidth by minimizing the number of segments that are sent.
|
||||
# When applications wish to decrease network latency, they can disable Nagle's algorithm (by enabling TcpNoDelay).
|
||||
# Data will be sent earlier, at the cost of an increase in bandwidth consumption.
|
||||
# Default: True (disabled)
|
||||
TcpNoDelay = True
|
@ -813,9 +813,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)
|
||||
@ -1515,9 +1515,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();
|
||||
@ -3696,6 +3696,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
|
||||
{
|
||||
|
@ -494,8 +494,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();
|
||||
}
|
||||
|
||||
|
@ -35,12 +35,6 @@ PacketFloodDrop = False
|
||||
# Default: True
|
||||
PacketFloodLogged = True
|
||||
|
||||
# Nagle's algorithm tries to conserve bandwidth by minimizing the number of segments that are sent.
|
||||
# When applications wish to decrease network latency, they can disable Nagle's algorithm (by enabling TcpNoDelay).
|
||||
# Data will be sent earlier, at the cost of an increase in bandwidth consumption.
|
||||
# Default: True (disabled)
|
||||
TcpNoDelay = True
|
||||
|
||||
# Packet encryption.
|
||||
# By default packets sent or received are encrypted using the Blowfish algorithm.
|
||||
# Disabling this reduces the resources needed to process any packets transfered,
|
||||
@ -51,3 +45,9 @@ PacketEncryption = False
|
||||
# Log message when packet decryption has failed.
|
||||
# Default: True
|
||||
FailedDecryptionLogged = True
|
||||
|
||||
# Nagle's algorithm tries to conserve bandwidth by minimizing the number of segments that are sent.
|
||||
# When applications wish to decrease network latency, they can disable Nagle's algorithm (by enabling TcpNoDelay).
|
||||
# Data will be sent earlier, at the cost of an increase in bandwidth consumption.
|
||||
# Default: True (disabled)
|
||||
TcpNoDelay = True
|
||||
|
46
L2J_Mobius_10.3_MasterClass/dist/login/config/Network.ini
vendored
Normal file
46
L2J_Mobius_10.3_MasterClass/dist/login/config/Network.ini
vendored
Normal file
@ -0,0 +1,46 @@
|
||||
# ---------------------------------------------------------------------------------------------------------------------------------
|
||||
# Network Settings
|
||||
# These settings provide fine-grained control over the network behavior and packet handling within the server application.
|
||||
# Adjusting these parameters can help optimize network performance and ensure secure communication between the server and clients.
|
||||
# ---------------------------------------------------------------------------------------------------------------------------------
|
||||
|
||||
# Client pool size for reading client packets.
|
||||
# Each pool is executed on a separate thread.
|
||||
# Default: 100
|
||||
ClientReadPoolSize = 100
|
||||
|
||||
# Client pool size for sending server packets.
|
||||
# Each pool is executed on a separate thread.
|
||||
# Default: 100
|
||||
ClientSendPoolSize = 100
|
||||
|
||||
# Client pool size for executing client packets.
|
||||
# Each pool is executed on a separate thread.
|
||||
# Default: 100
|
||||
ClientExecutePoolSize = 100
|
||||
|
||||
# Expected client packet count queued by the server.
|
||||
# Default: 80
|
||||
PacketQueueLimit = 80
|
||||
|
||||
# Disconnect client when queue has reached the queue packet limit.
|
||||
# Default: True
|
||||
PacketFloodDisconnect = True
|
||||
|
||||
# Drop packets when queue has reached the queue packet limit.
|
||||
# Default: False
|
||||
PacketFloodDrop = False
|
||||
|
||||
# Log message when queue has reached the queue packet limit.
|
||||
# Default: True
|
||||
PacketFloodLogged = True
|
||||
|
||||
# Log message when packet decryption has failed.
|
||||
# Default: False
|
||||
FailedDecryptionLogged = False
|
||||
|
||||
# Nagle's algorithm tries to conserve bandwidth by minimizing the number of segments that are sent.
|
||||
# When applications wish to decrease network latency, they can disable Nagle's algorithm (by enabling TcpNoDelay).
|
||||
# Data will be sent earlier, at the cost of an increase in bandwidth consumption.
|
||||
# Default: True (disabled)
|
||||
TcpNoDelay = True
|
@ -817,9 +817,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)
|
||||
@ -1549,9 +1549,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();
|
||||
@ -3754,6 +3754,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
|
||||
{
|
||||
|
@ -498,8 +498,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();
|
||||
}
|
||||
|
||||
|
@ -35,12 +35,12 @@ PacketFloodDrop = False
|
||||
# Default: True
|
||||
PacketFloodLogged = True
|
||||
|
||||
# Log message when packet decryption has failed.
|
||||
# Default: True
|
||||
FailedDecryptionLogged = True
|
||||
|
||||
# Nagle's algorithm tries to conserve bandwidth by minimizing the number of segments that are sent.
|
||||
# When applications wish to decrease network latency, they can disable Nagle's algorithm (by enabling TcpNoDelay).
|
||||
# Data will be sent earlier, at the cost of an increase in bandwidth consumption.
|
||||
# Default: True (disabled)
|
||||
TcpNoDelay = True
|
||||
|
||||
# Log message when packet decryption has failed.
|
||||
# Default: True
|
||||
FailedDecryptionLogged = True
|
||||
|
@ -1074,8 +1074,8 @@ 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 FAILED_DECRYPTION_LOGGED;
|
||||
public static boolean TCP_NO_DELAY;
|
||||
|
||||
public static int IP_UPDATE_TIME;
|
||||
public static boolean SHOW_LICENCE;
|
||||
@ -1197,8 +1197,8 @@ 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);
|
||||
FAILED_DECRYPTION_LOGGED = networkConfig.getBoolean("FailedDecryptionLogged", true);
|
||||
TCP_NO_DELAY = networkConfig.getBoolean("TcpNoDelay", true);
|
||||
}
|
||||
|
||||
public static void loadRatesConfig()
|
||||
|
@ -464,8 +464,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();
|
||||
|
@ -35,12 +35,6 @@ PacketFloodDrop = False
|
||||
# Default: True
|
||||
PacketFloodLogged = True
|
||||
|
||||
# Nagle's algorithm tries to conserve bandwidth by minimizing the number of segments that are sent.
|
||||
# When applications wish to decrease network latency, they can disable Nagle's algorithm (by enabling TcpNoDelay).
|
||||
# Data will be sent earlier, at the cost of an increase in bandwidth consumption.
|
||||
# Default: True (disabled)
|
||||
TcpNoDelay = True
|
||||
|
||||
# Packet encryption.
|
||||
# By default packets sent or received are encrypted using the Blowfish algorithm.
|
||||
# Disabling this reduces the resources needed to process any packets transfered,
|
||||
@ -51,3 +45,9 @@ PacketEncryption = False
|
||||
# Log message when packet decryption has failed.
|
||||
# Default: True
|
||||
FailedDecryptionLogged = True
|
||||
|
||||
# Nagle's algorithm tries to conserve bandwidth by minimizing the number of segments that are sent.
|
||||
# When applications wish to decrease network latency, they can disable Nagle's algorithm (by enabling TcpNoDelay).
|
||||
# Data will be sent earlier, at the cost of an increase in bandwidth consumption.
|
||||
# Default: True (disabled)
|
||||
TcpNoDelay = True
|
||||
|
46
L2J_Mobius_C6_Interlude/dist/login/config/Network.ini
vendored
Normal file
46
L2J_Mobius_C6_Interlude/dist/login/config/Network.ini
vendored
Normal file
@ -0,0 +1,46 @@
|
||||
# ---------------------------------------------------------------------------------------------------------------------------------
|
||||
# Network Settings
|
||||
# These settings provide fine-grained control over the network behavior and packet handling within the server application.
|
||||
# Adjusting these parameters can help optimize network performance and ensure secure communication between the server and clients.
|
||||
# ---------------------------------------------------------------------------------------------------------------------------------
|
||||
|
||||
# Client pool size for reading client packets.
|
||||
# Each pool is executed on a separate thread.
|
||||
# Default: 100
|
||||
ClientReadPoolSize = 100
|
||||
|
||||
# Client pool size for sending server packets.
|
||||
# Each pool is executed on a separate thread.
|
||||
# Default: 100
|
||||
ClientSendPoolSize = 100
|
||||
|
||||
# Client pool size for executing client packets.
|
||||
# Each pool is executed on a separate thread.
|
||||
# Default: 100
|
||||
ClientExecutePoolSize = 100
|
||||
|
||||
# Expected client packet count queued by the server.
|
||||
# Default: 80
|
||||
PacketQueueLimit = 80
|
||||
|
||||
# Disconnect client when queue has reached the queue packet limit.
|
||||
# Default: True
|
||||
PacketFloodDisconnect = True
|
||||
|
||||
# Drop packets when queue has reached the queue packet limit.
|
||||
# Default: False
|
||||
PacketFloodDrop = False
|
||||
|
||||
# Log message when queue has reached the queue packet limit.
|
||||
# Default: True
|
||||
PacketFloodLogged = True
|
||||
|
||||
# Log message when packet decryption has failed.
|
||||
# Default: False
|
||||
FailedDecryptionLogged = False
|
||||
|
||||
# Nagle's algorithm tries to conserve bandwidth by minimizing the number of segments that are sent.
|
||||
# When applications wish to decrease network latency, they can disable Nagle's algorithm (by enabling TcpNoDelay).
|
||||
# Data will be sent earlier, at the cost of an increase in bandwidth consumption.
|
||||
# Default: True (disabled)
|
||||
TcpNoDelay = True
|
@ -1121,9 +1121,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;
|
||||
|
||||
public static boolean SHOW_LICENCE;
|
||||
public static boolean FLOOD_PROTECTION;
|
||||
@ -1238,9 +1238,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);
|
||||
}
|
||||
|
||||
public static void loadRatesConfig()
|
||||
@ -3048,6 +3048,7 @@ public class Config
|
||||
else if (SERVER_MODE == ServerMode.LOGIN)
|
||||
{
|
||||
loadLoginStartConfig();
|
||||
loadNetworkConfig();
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -478,8 +478,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();
|
||||
}
|
||||
|
||||
|
@ -35,12 +35,6 @@ PacketFloodDrop = False
|
||||
# Default: True
|
||||
PacketFloodLogged = True
|
||||
|
||||
# Nagle's algorithm tries to conserve bandwidth by minimizing the number of segments that are sent.
|
||||
# When applications wish to decrease network latency, they can disable Nagle's algorithm (by enabling TcpNoDelay).
|
||||
# Data will be sent earlier, at the cost of an increase in bandwidth consumption.
|
||||
# Default: True (disabled)
|
||||
TcpNoDelay = True
|
||||
|
||||
# Packet encryption.
|
||||
# By default packets sent or received are encrypted using the Blowfish algorithm.
|
||||
# Disabling this reduces the resources needed to process any packets transfered,
|
||||
@ -51,3 +45,9 @@ PacketEncryption = False
|
||||
# Log message when packet decryption has failed.
|
||||
# Default: True
|
||||
FailedDecryptionLogged = True
|
||||
|
||||
# Nagle's algorithm tries to conserve bandwidth by minimizing the number of segments that are sent.
|
||||
# When applications wish to decrease network latency, they can disable Nagle's algorithm (by enabling TcpNoDelay).
|
||||
# Data will be sent earlier, at the cost of an increase in bandwidth consumption.
|
||||
# Default: True (disabled)
|
||||
TcpNoDelay = True
|
||||
|
46
L2J_Mobius_CT_0_Interlude/dist/login/config/Network.ini
vendored
Normal file
46
L2J_Mobius_CT_0_Interlude/dist/login/config/Network.ini
vendored
Normal file
@ -0,0 +1,46 @@
|
||||
# ---------------------------------------------------------------------------------------------------------------------------------
|
||||
# Network Settings
|
||||
# These settings provide fine-grained control over the network behavior and packet handling within the server application.
|
||||
# Adjusting these parameters can help optimize network performance and ensure secure communication between the server and clients.
|
||||
# ---------------------------------------------------------------------------------------------------------------------------------
|
||||
|
||||
# Client pool size for reading client packets.
|
||||
# Each pool is executed on a separate thread.
|
||||
# Default: 100
|
||||
ClientReadPoolSize = 100
|
||||
|
||||
# Client pool size for sending server packets.
|
||||
# Each pool is executed on a separate thread.
|
||||
# Default: 100
|
||||
ClientSendPoolSize = 100
|
||||
|
||||
# Client pool size for executing client packets.
|
||||
# Each pool is executed on a separate thread.
|
||||
# Default: 100
|
||||
ClientExecutePoolSize = 100
|
||||
|
||||
# Expected client packet count queued by the server.
|
||||
# Default: 80
|
||||
PacketQueueLimit = 80
|
||||
|
||||
# Disconnect client when queue has reached the queue packet limit.
|
||||
# Default: True
|
||||
PacketFloodDisconnect = True
|
||||
|
||||
# Drop packets when queue has reached the queue packet limit.
|
||||
# Default: False
|
||||
PacketFloodDrop = False
|
||||
|
||||
# Log message when queue has reached the queue packet limit.
|
||||
# Default: True
|
||||
PacketFloodLogged = True
|
||||
|
||||
# Log message when packet decryption has failed.
|
||||
# Default: False
|
||||
FailedDecryptionLogged = False
|
||||
|
||||
# Nagle's algorithm tries to conserve bandwidth by minimizing the number of segments that are sent.
|
||||
# When applications wish to decrease network latency, they can disable Nagle's algorithm (by enabling TcpNoDelay).
|
||||
# Data will be sent earlier, at the cost of an increase in bandwidth consumption.
|
||||
# Default: True (disabled)
|
||||
TcpNoDelay = True
|
@ -914,9 +914,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;
|
||||
|
||||
// --------------------------------------------------
|
||||
// Vitality Settings
|
||||
@ -1438,9 +1438,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();
|
||||
@ -3085,6 +3085,17 @@ public class Config
|
||||
NORMAL_CONNECTION_TIME = loginConfig.getInt("NormalConnectionTime", 700);
|
||||
FAST_CONNECTION_TIME = loginConfig.getInt("FastConnectionTime", 350);
|
||||
MAX_CONNECTION_PER_IP = loginConfig.getInt("MaxConnectionPerIP", 50);
|
||||
|
||||
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
|
||||
{
|
||||
|
@ -444,8 +444,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();
|
||||
}
|
||||
|
||||
|
@ -35,12 +35,6 @@ PacketFloodDrop = False
|
||||
# Default: True
|
||||
PacketFloodLogged = True
|
||||
|
||||
# Nagle's algorithm tries to conserve bandwidth by minimizing the number of segments that are sent.
|
||||
# When applications wish to decrease network latency, they can disable Nagle's algorithm (by enabling TcpNoDelay).
|
||||
# Data will be sent earlier, at the cost of an increase in bandwidth consumption.
|
||||
# Default: True (disabled)
|
||||
TcpNoDelay = True
|
||||
|
||||
# Packet encryption.
|
||||
# By default packets sent or received are encrypted using the Blowfish algorithm.
|
||||
# Disabling this reduces the resources needed to process any packets transfered,
|
||||
@ -51,3 +45,9 @@ PacketEncryption = False
|
||||
# Log message when packet decryption has failed.
|
||||
# Default: True
|
||||
FailedDecryptionLogged = True
|
||||
|
||||
# Nagle's algorithm tries to conserve bandwidth by minimizing the number of segments that are sent.
|
||||
# When applications wish to decrease network latency, they can disable Nagle's algorithm (by enabling TcpNoDelay).
|
||||
# Data will be sent earlier, at the cost of an increase in bandwidth consumption.
|
||||
# Default: True (disabled)
|
||||
TcpNoDelay = True
|
||||
|
46
L2J_Mobius_CT_2.4_Epilogue/dist/login/config/Network.ini
vendored
Normal file
46
L2J_Mobius_CT_2.4_Epilogue/dist/login/config/Network.ini
vendored
Normal file
@ -0,0 +1,46 @@
|
||||
# ---------------------------------------------------------------------------------------------------------------------------------
|
||||
# Network Settings
|
||||
# These settings provide fine-grained control over the network behavior and packet handling within the server application.
|
||||
# Adjusting these parameters can help optimize network performance and ensure secure communication between the server and clients.
|
||||
# ---------------------------------------------------------------------------------------------------------------------------------
|
||||
|
||||
# Client pool size for reading client packets.
|
||||
# Each pool is executed on a separate thread.
|
||||
# Default: 100
|
||||
ClientReadPoolSize = 100
|
||||
|
||||
# Client pool size for sending server packets.
|
||||
# Each pool is executed on a separate thread.
|
||||
# Default: 100
|
||||
ClientSendPoolSize = 100
|
||||
|
||||
# Client pool size for executing client packets.
|
||||
# Each pool is executed on a separate thread.
|
||||
# Default: 100
|
||||
ClientExecutePoolSize = 100
|
||||
|
||||
# Expected client packet count queued by the server.
|
||||
# Default: 80
|
||||
PacketQueueLimit = 80
|
||||
|
||||
# Disconnect client when queue has reached the queue packet limit.
|
||||
# Default: True
|
||||
PacketFloodDisconnect = True
|
||||
|
||||
# Drop packets when queue has reached the queue packet limit.
|
||||
# Default: False
|
||||
PacketFloodDrop = False
|
||||
|
||||
# Log message when queue has reached the queue packet limit.
|
||||
# Default: True
|
||||
PacketFloodLogged = True
|
||||
|
||||
# Log message when packet decryption has failed.
|
||||
# Default: False
|
||||
FailedDecryptionLogged = False
|
||||
|
||||
# Nagle's algorithm tries to conserve bandwidth by minimizing the number of segments that are sent.
|
||||
# When applications wish to decrease network latency, they can disable Nagle's algorithm (by enabling TcpNoDelay).
|
||||
# Data will be sent earlier, at the cost of an increase in bandwidth consumption.
|
||||
# Default: True (disabled)
|
||||
TcpNoDelay = True
|
@ -939,9 +939,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;
|
||||
|
||||
// --------------------------------------------------
|
||||
// Vitality Settings
|
||||
@ -1491,9 +1491,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();
|
||||
@ -3201,6 +3201,17 @@ public class Config
|
||||
NORMAL_CONNECTION_TIME = loginConfig.getInt("NormalConnectionTime", 700);
|
||||
FAST_CONNECTION_TIME = loginConfig.getInt("FastConnectionTime", 350);
|
||||
MAX_CONNECTION_PER_IP = loginConfig.getInt("MaxConnectionPerIP", 50);
|
||||
|
||||
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
|
||||
{
|
||||
|
@ -474,8 +474,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();
|
||||
}
|
||||
|
||||
|
@ -35,12 +35,6 @@ PacketFloodDrop = False
|
||||
# Default: True
|
||||
PacketFloodLogged = True
|
||||
|
||||
# Nagle's algorithm tries to conserve bandwidth by minimizing the number of segments that are sent.
|
||||
# When applications wish to decrease network latency, they can disable Nagle's algorithm (by enabling TcpNoDelay).
|
||||
# Data will be sent earlier, at the cost of an increase in bandwidth consumption.
|
||||
# Default: True (disabled)
|
||||
TcpNoDelay = True
|
||||
|
||||
# Packet encryption.
|
||||
# By default packets sent or received are encrypted using the Blowfish algorithm.
|
||||
# Disabling this reduces the resources needed to process any packets transfered,
|
||||
@ -51,3 +45,9 @@ PacketEncryption = False
|
||||
# Log message when packet decryption has failed.
|
||||
# Default: True
|
||||
FailedDecryptionLogged = True
|
||||
|
||||
# Nagle's algorithm tries to conserve bandwidth by minimizing the number of segments that are sent.
|
||||
# When applications wish to decrease network latency, they can disable Nagle's algorithm (by enabling TcpNoDelay).
|
||||
# Data will be sent earlier, at the cost of an increase in bandwidth consumption.
|
||||
# Default: True (disabled)
|
||||
TcpNoDelay = True
|
||||
|
46
L2J_Mobius_CT_2.6_HighFive/dist/login/config/Network.ini
vendored
Normal file
46
L2J_Mobius_CT_2.6_HighFive/dist/login/config/Network.ini
vendored
Normal file
@ -0,0 +1,46 @@
|
||||
# ---------------------------------------------------------------------------------------------------------------------------------
|
||||
# Network Settings
|
||||
# These settings provide fine-grained control over the network behavior and packet handling within the server application.
|
||||
# Adjusting these parameters can help optimize network performance and ensure secure communication between the server and clients.
|
||||
# ---------------------------------------------------------------------------------------------------------------------------------
|
||||
|
||||
# Client pool size for reading client packets.
|
||||
# Each pool is executed on a separate thread.
|
||||
# Default: 100
|
||||
ClientReadPoolSize = 100
|
||||
|
||||
# Client pool size for sending server packets.
|
||||
# Each pool is executed on a separate thread.
|
||||
# Default: 100
|
||||
ClientSendPoolSize = 100
|
||||
|
||||
# Client pool size for executing client packets.
|
||||
# Each pool is executed on a separate thread.
|
||||
# Default: 100
|
||||
ClientExecutePoolSize = 100
|
||||
|
||||
# Expected client packet count queued by the server.
|
||||
# Default: 80
|
||||
PacketQueueLimit = 80
|
||||
|
||||
# Disconnect client when queue has reached the queue packet limit.
|
||||
# Default: True
|
||||
PacketFloodDisconnect = True
|
||||
|
||||
# Drop packets when queue has reached the queue packet limit.
|
||||
# Default: False
|
||||
PacketFloodDrop = False
|
||||
|
||||
# Log message when queue has reached the queue packet limit.
|
||||
# Default: True
|
||||
PacketFloodLogged = True
|
||||
|
||||
# Log message when packet decryption has failed.
|
||||
# Default: False
|
||||
FailedDecryptionLogged = False
|
||||
|
||||
# Nagle's algorithm tries to conserve bandwidth by minimizing the number of segments that are sent.
|
||||
# When applications wish to decrease network latency, they can disable Nagle's algorithm (by enabling TcpNoDelay).
|
||||
# Data will be sent earlier, at the cost of an increase in bandwidth consumption.
|
||||
# Default: True (disabled)
|
||||
TcpNoDelay = True
|
@ -944,9 +944,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;
|
||||
|
||||
// --------------------------------------------------
|
||||
// Vitality Settings
|
||||
@ -1491,9 +1491,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();
|
||||
@ -3208,6 +3208,17 @@ public class Config
|
||||
NORMAL_CONNECTION_TIME = loginConfig.getInt("NormalConnectionTime", 700);
|
||||
FAST_CONNECTION_TIME = loginConfig.getInt("FastConnectionTime", 350);
|
||||
MAX_CONNECTION_PER_IP = loginConfig.getInt("MaxConnectionPerIP", 50);
|
||||
|
||||
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();
|
||||
}
|
||||
|
||||
|
@ -35,12 +35,6 @@ PacketFloodDrop = False
|
||||
# Default: True
|
||||
PacketFloodLogged = True
|
||||
|
||||
# Nagle's algorithm tries to conserve bandwidth by minimizing the number of segments that are sent.
|
||||
# When applications wish to decrease network latency, they can disable Nagle's algorithm (by enabling TcpNoDelay).
|
||||
# Data will be sent earlier, at the cost of an increase in bandwidth consumption.
|
||||
# Default: True (disabled)
|
||||
TcpNoDelay = True
|
||||
|
||||
# Packet encryption.
|
||||
# By default packets sent or received are encrypted using the Blowfish algorithm.
|
||||
# Disabling this reduces the resources needed to process any packets transfered,
|
||||
@ -51,3 +45,9 @@ PacketEncryption = False
|
||||
# Log message when packet decryption has failed.
|
||||
# Default: True
|
||||
FailedDecryptionLogged = True
|
||||
|
||||
# Nagle's algorithm tries to conserve bandwidth by minimizing the number of segments that are sent.
|
||||
# When applications wish to decrease network latency, they can disable Nagle's algorithm (by enabling TcpNoDelay).
|
||||
# Data will be sent earlier, at the cost of an increase in bandwidth consumption.
|
||||
# Default: True (disabled)
|
||||
TcpNoDelay = True
|
||||
|
46
L2J_Mobius_Classic_1.0/dist/login/config/Network.ini
vendored
Normal file
46
L2J_Mobius_Classic_1.0/dist/login/config/Network.ini
vendored
Normal file
@ -0,0 +1,46 @@
|
||||
# ---------------------------------------------------------------------------------------------------------------------------------
|
||||
# Network Settings
|
||||
# These settings provide fine-grained control over the network behavior and packet handling within the server application.
|
||||
# Adjusting these parameters can help optimize network performance and ensure secure communication between the server and clients.
|
||||
# ---------------------------------------------------------------------------------------------------------------------------------
|
||||
|
||||
# Client pool size for reading client packets.
|
||||
# Each pool is executed on a separate thread.
|
||||
# Default: 100
|
||||
ClientReadPoolSize = 100
|
||||
|
||||
# Client pool size for sending server packets.
|
||||
# Each pool is executed on a separate thread.
|
||||
# Default: 100
|
||||
ClientSendPoolSize = 100
|
||||
|
||||
# Client pool size for executing client packets.
|
||||
# Each pool is executed on a separate thread.
|
||||
# Default: 100
|
||||
ClientExecutePoolSize = 100
|
||||
|
||||
# Expected client packet count queued by the server.
|
||||
# Default: 80
|
||||
PacketQueueLimit = 80
|
||||
|
||||
# Disconnect client when queue has reached the queue packet limit.
|
||||
# Default: True
|
||||
PacketFloodDisconnect = True
|
||||
|
||||
# Drop packets when queue has reached the queue packet limit.
|
||||
# Default: False
|
||||
PacketFloodDrop = False
|
||||
|
||||
# Log message when queue has reached the queue packet limit.
|
||||
# Default: True
|
||||
PacketFloodLogged = True
|
||||
|
||||
# Log message when packet decryption has failed.
|
||||
# Default: False
|
||||
FailedDecryptionLogged = False
|
||||
|
||||
# Nagle's algorithm tries to conserve bandwidth by minimizing the number of segments that are sent.
|
||||
# When applications wish to decrease network latency, they can disable Nagle's algorithm (by enabling TcpNoDelay).
|
||||
# Data will be sent earlier, at the cost of an increase in bandwidth consumption.
|
||||
# Default: True (disabled)
|
||||
TcpNoDelay = True
|
@ -817,9 +817,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;
|
||||
|
||||
// --------------------------------------------------
|
||||
// Vitality Settings
|
||||
@ -1414,9 +1414,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();
|
||||
@ -3491,6 +3491,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
|
||||
{
|
||||
|
@ -457,8 +457,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();
|
||||
}
|
||||
|
||||
|
@ -35,12 +35,6 @@ PacketFloodDrop = False
|
||||
# Default: True
|
||||
PacketFloodLogged = True
|
||||
|
||||
# Nagle's algorithm tries to conserve bandwidth by minimizing the number of segments that are sent.
|
||||
# When applications wish to decrease network latency, they can disable Nagle's algorithm (by enabling TcpNoDelay).
|
||||
# Data will be sent earlier, at the cost of an increase in bandwidth consumption.
|
||||
# Default: True (disabled)
|
||||
TcpNoDelay = True
|
||||
|
||||
# Packet encryption.
|
||||
# By default packets sent or received are encrypted using the Blowfish algorithm.
|
||||
# Disabling this reduces the resources needed to process any packets transfered,
|
||||
@ -51,3 +45,9 @@ PacketEncryption = False
|
||||
# Log message when packet decryption has failed.
|
||||
# Default: True
|
||||
FailedDecryptionLogged = True
|
||||
|
||||
# Nagle's algorithm tries to conserve bandwidth by minimizing the number of segments that are sent.
|
||||
# When applications wish to decrease network latency, they can disable Nagle's algorithm (by enabling TcpNoDelay).
|
||||
# Data will be sent earlier, at the cost of an increase in bandwidth consumption.
|
||||
# Default: True (disabled)
|
||||
TcpNoDelay = True
|
||||
|
46
L2J_Mobius_Classic_1.5_AgeOfSplendor/dist/login/config/Network.ini
vendored
Normal file
46
L2J_Mobius_Classic_1.5_AgeOfSplendor/dist/login/config/Network.ini
vendored
Normal file
@ -0,0 +1,46 @@
|
||||
# ---------------------------------------------------------------------------------------------------------------------------------
|
||||
# Network Settings
|
||||
# These settings provide fine-grained control over the network behavior and packet handling within the server application.
|
||||
# Adjusting these parameters can help optimize network performance and ensure secure communication between the server and clients.
|
||||
# ---------------------------------------------------------------------------------------------------------------------------------
|
||||
|
||||
# Client pool size for reading client packets.
|
||||
# Each pool is executed on a separate thread.
|
||||
# Default: 100
|
||||
ClientReadPoolSize = 100
|
||||
|
||||
# Client pool size for sending server packets.
|
||||
# Each pool is executed on a separate thread.
|
||||
# Default: 100
|
||||
ClientSendPoolSize = 100
|
||||
|
||||
# Client pool size for executing client packets.
|
||||
# Each pool is executed on a separate thread.
|
||||
# Default: 100
|
||||
ClientExecutePoolSize = 100
|
||||
|
||||
# Expected client packet count queued by the server.
|
||||
# Default: 80
|
||||
PacketQueueLimit = 80
|
||||
|
||||
# Disconnect client when queue has reached the queue packet limit.
|
||||
# Default: True
|
||||
PacketFloodDisconnect = True
|
||||
|
||||
# Drop packets when queue has reached the queue packet limit.
|
||||
# Default: False
|
||||
PacketFloodDrop = False
|
||||
|
||||
# Log message when queue has reached the queue packet limit.
|
||||
# Default: True
|
||||
PacketFloodLogged = True
|
||||
|
||||
# Log message when packet decryption has failed.
|
||||
# Default: False
|
||||
FailedDecryptionLogged = False
|
||||
|
||||
# Nagle's algorithm tries to conserve bandwidth by minimizing the number of segments that are sent.
|
||||
# When applications wish to decrease network latency, they can disable Nagle's algorithm (by enabling TcpNoDelay).
|
||||
# Data will be sent earlier, at the cost of an increase in bandwidth consumption.
|
||||
# Default: True (disabled)
|
||||
TcpNoDelay = True
|
@ -827,9 +827,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;
|
||||
|
||||
// --------------------------------------------------
|
||||
// Vitality Settings
|
||||
@ -1432,9 +1432,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();
|
||||
@ -3537,6 +3537,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
|
||||
{
|
||||
|
@ -465,8 +465,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();
|
||||
}
|
||||
|
||||
|
@ -35,12 +35,6 @@ PacketFloodDrop = False
|
||||
# Default: True
|
||||
PacketFloodLogged = True
|
||||
|
||||
# Nagle's algorithm tries to conserve bandwidth by minimizing the number of segments that are sent.
|
||||
# When applications wish to decrease network latency, they can disable Nagle's algorithm (by enabling TcpNoDelay).
|
||||
# Data will be sent earlier, at the cost of an increase in bandwidth consumption.
|
||||
# Default: True (disabled)
|
||||
TcpNoDelay = True
|
||||
|
||||
# Packet encryption.
|
||||
# By default packets sent or received are encrypted using the Blowfish algorithm.
|
||||
# Disabling this reduces the resources needed to process any packets transfered,
|
||||
@ -51,3 +45,9 @@ PacketEncryption = False
|
||||
# Log message when packet decryption has failed.
|
||||
# Default: True
|
||||
FailedDecryptionLogged = True
|
||||
|
||||
# Nagle's algorithm tries to conserve bandwidth by minimizing the number of segments that are sent.
|
||||
# When applications wish to decrease network latency, they can disable Nagle's algorithm (by enabling TcpNoDelay).
|
||||
# Data will be sent earlier, at the cost of an increase in bandwidth consumption.
|
||||
# Default: True (disabled)
|
||||
TcpNoDelay = True
|
||||
|
46
L2J_Mobius_Classic_2.0_Saviors/dist/login/config/Network.ini
vendored
Normal file
46
L2J_Mobius_Classic_2.0_Saviors/dist/login/config/Network.ini
vendored
Normal file
@ -0,0 +1,46 @@
|
||||
# ---------------------------------------------------------------------------------------------------------------------------------
|
||||
# Network Settings
|
||||
# These settings provide fine-grained control over the network behavior and packet handling within the server application.
|
||||
# Adjusting these parameters can help optimize network performance and ensure secure communication between the server and clients.
|
||||
# ---------------------------------------------------------------------------------------------------------------------------------
|
||||
|
||||
# Client pool size for reading client packets.
|
||||
# Each pool is executed on a separate thread.
|
||||
# Default: 100
|
||||
ClientReadPoolSize = 100
|
||||
|
||||
# Client pool size for sending server packets.
|
||||
# Each pool is executed on a separate thread.
|
||||
# Default: 100
|
||||
ClientSendPoolSize = 100
|
||||
|
||||
# Client pool size for executing client packets.
|
||||
# Each pool is executed on a separate thread.
|
||||
# Default: 100
|
||||
ClientExecutePoolSize = 100
|
||||
|
||||
# Expected client packet count queued by the server.
|
||||
# Default: 80
|
||||
PacketQueueLimit = 80
|
||||
|
||||
# Disconnect client when queue has reached the queue packet limit.
|
||||
# Default: True
|
||||
PacketFloodDisconnect = True
|
||||
|
||||
# Drop packets when queue has reached the queue packet limit.
|
||||
# Default: False
|
||||
PacketFloodDrop = False
|
||||
|
||||
# Log message when queue has reached the queue packet limit.
|
||||
# Default: True
|
||||
PacketFloodLogged = True
|
||||
|
||||
# Log message when packet decryption has failed.
|
||||
# Default: False
|
||||
FailedDecryptionLogged = False
|
||||
|
||||
# Nagle's algorithm tries to conserve bandwidth by minimizing the number of segments that are sent.
|
||||
# When applications wish to decrease network latency, they can disable Nagle's algorithm (by enabling TcpNoDelay).
|
||||
# Data will be sent earlier, at the cost of an increase in bandwidth consumption.
|
||||
# Default: True (disabled)
|
||||
TcpNoDelay = True
|
@ -830,9 +830,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;
|
||||
|
||||
// --------------------------------------------------
|
||||
// Vitality Settings
|
||||
@ -1435,9 +1435,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();
|
||||
@ -3543,6 +3543,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
|
||||
{
|
||||
|
@ -471,8 +471,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();
|
||||
}
|
||||
|
||||
|
@ -35,12 +35,6 @@ PacketFloodDrop = False
|
||||
# Default: True
|
||||
PacketFloodLogged = True
|
||||
|
||||
# Nagle's algorithm tries to conserve bandwidth by minimizing the number of segments that are sent.
|
||||
# When applications wish to decrease network latency, they can disable Nagle's algorithm (by enabling TcpNoDelay).
|
||||
# Data will be sent earlier, at the cost of an increase in bandwidth consumption.
|
||||
# Default: True (disabled)
|
||||
TcpNoDelay = True
|
||||
|
||||
# Packet encryption.
|
||||
# By default packets sent or received are encrypted using the Blowfish algorithm.
|
||||
# Disabling this reduces the resources needed to process any packets transfered,
|
||||
@ -51,3 +45,9 @@ PacketEncryption = False
|
||||
# Log message when packet decryption has failed.
|
||||
# Default: True
|
||||
FailedDecryptionLogged = True
|
||||
|
||||
# Nagle's algorithm tries to conserve bandwidth by minimizing the number of segments that are sent.
|
||||
# When applications wish to decrease network latency, they can disable Nagle's algorithm (by enabling TcpNoDelay).
|
||||
# Data will be sent earlier, at the cost of an increase in bandwidth consumption.
|
||||
# Default: True (disabled)
|
||||
TcpNoDelay = True
|
||||
|
46
L2J_Mobius_Classic_2.5_Zaken/dist/login/config/Network.ini
vendored
Normal file
46
L2J_Mobius_Classic_2.5_Zaken/dist/login/config/Network.ini
vendored
Normal file
@ -0,0 +1,46 @@
|
||||
# ---------------------------------------------------------------------------------------------------------------------------------
|
||||
# Network Settings
|
||||
# These settings provide fine-grained control over the network behavior and packet handling within the server application.
|
||||
# Adjusting these parameters can help optimize network performance and ensure secure communication between the server and clients.
|
||||
# ---------------------------------------------------------------------------------------------------------------------------------
|
||||
|
||||
# Client pool size for reading client packets.
|
||||
# Each pool is executed on a separate thread.
|
||||
# Default: 100
|
||||
ClientReadPoolSize = 100
|
||||
|
||||
# Client pool size for sending server packets.
|
||||
# Each pool is executed on a separate thread.
|
||||
# Default: 100
|
||||
ClientSendPoolSize = 100
|
||||
|
||||
# Client pool size for executing client packets.
|
||||
# Each pool is executed on a separate thread.
|
||||
# Default: 100
|
||||
ClientExecutePoolSize = 100
|
||||
|
||||
# Expected client packet count queued by the server.
|
||||
# Default: 80
|
||||
PacketQueueLimit = 80
|
||||
|
||||
# Disconnect client when queue has reached the queue packet limit.
|
||||
# Default: True
|
||||
PacketFloodDisconnect = True
|
||||
|
||||
# Drop packets when queue has reached the queue packet limit.
|
||||
# Default: False
|
||||
PacketFloodDrop = False
|
||||
|
||||
# Log message when queue has reached the queue packet limit.
|
||||
# Default: True
|
||||
PacketFloodLogged = True
|
||||
|
||||
# Log message when packet decryption has failed.
|
||||
# Default: False
|
||||
FailedDecryptionLogged = False
|
||||
|
||||
# Nagle's algorithm tries to conserve bandwidth by minimizing the number of segments that are sent.
|
||||
# When applications wish to decrease network latency, they can disable Nagle's algorithm (by enabling TcpNoDelay).
|
||||
# Data will be sent earlier, at the cost of an increase in bandwidth consumption.
|
||||
# Default: True (disabled)
|
||||
TcpNoDelay = True
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user