mirror of
https://github.com/Grasscutters/Grasscutter.git
synced 2025-01-25 08:22:53 +08:00
Add kcpInterval
to the config
This commit is contained in:
parent
8651cdd12b
commit
c0418067d6
@ -120,10 +120,10 @@ public class ConfigContainer {
|
|||||||
|
|
||||||
public static class HTTP {
|
public static class HTTP {
|
||||||
public String bindAddress = "0.0.0.0";
|
public String bindAddress = "0.0.0.0";
|
||||||
|
public int bindPort = 443;
|
||||||
|
|
||||||
/* This is the address used in URLs. */
|
/* This is the address used in URLs. */
|
||||||
public String accessAddress = "127.0.0.1";
|
public String accessAddress = "127.0.0.1";
|
||||||
|
|
||||||
public int bindPort = 443;
|
|
||||||
/* This is the port used in URLs. */
|
/* This is the port used in URLs. */
|
||||||
public int accessPort = 0;
|
public int accessPort = 0;
|
||||||
|
|
||||||
@ -145,7 +145,9 @@ public class ConfigContainer {
|
|||||||
public int loadEntitiesForPlayerRange = 100;
|
public int loadEntitiesForPlayerRange = 100;
|
||||||
public boolean enableScriptInBigWorld = false;
|
public boolean enableScriptInBigWorld = false;
|
||||||
public boolean enableConsole = true;
|
public boolean enableConsole = true;
|
||||||
|
|
||||||
|
/* Kcp internal work interval (milliseconds) */
|
||||||
|
public int kcpInterval = 20;
|
||||||
/* Controls whether packets should be logged in console or not */
|
/* Controls whether packets should be logged in console or not */
|
||||||
public ServerDebugMode logPackets = ServerDebugMode.NONE;
|
public ServerDebugMode logPackets = ServerDebugMode.NONE;
|
||||||
|
|
||||||
|
@ -83,7 +83,7 @@ public final class GameServer extends KcpServer {
|
|||||||
|
|
||||||
public GameServer(InetSocketAddress address) {
|
public GameServer(InetSocketAddress address) {
|
||||||
ChannelConfig channelConfig = new ChannelConfig();
|
ChannelConfig channelConfig = new ChannelConfig();
|
||||||
channelConfig.nodelay(true, 20, 2, true);
|
channelConfig.nodelay(true, GAME_INFO.kcpInterval, 2, true);
|
||||||
channelConfig.setMtu(1400);
|
channelConfig.setMtu(1400);
|
||||||
channelConfig.setSndwnd(256);
|
channelConfig.setSndwnd(256);
|
||||||
channelConfig.setRcvwnd(256);
|
channelConfig.setRcvwnd(256);
|
||||||
|
Loading…
Reference in New Issue
Block a user