From e7b3781c3e5c105fcd80a75546b9ab75eae8a2c9 Mon Sep 17 00:00:00 2001 From: Simon Rettberg Date: Wed, 31 Jul 2013 21:45:00 +0200 Subject: [SERVER] Uplink handing complete (untested, as alt servers can't be defined yet, so prepare for lots of fixes ;)) --- src/config.h | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) (limited to 'src/config.h') diff --git a/src/config.h b/src/config.h index 3c2f166..6ad99dd 100644 --- a/src/config.h +++ b/src/config.h @@ -29,10 +29,11 @@ #define SERVER_MAX_IMAGES 5000 #define SERVER_MAX_ALTS 1000 #define SERVER_MAX_UPLINK_QUEUE 1000 +#define SERVER_MAX_PENDING_ALT_CHECKS 100 // +++++ Other magic constants -#define SERVER_RTT_PROBES 4 -#define SERVER_RTT_DELAY_INIT 8 +#define SERVER_RTT_PROBES 5 +#define SERVER_RTT_DELAY_INIT 5 #define SERVER_RTT_DELAY_MAX 15 // +++++ Network +++++ @@ -40,6 +41,9 @@ #define PORT 5003 #define RPC_PORT (PORT+1) +// No serialized payload allowed exceeding this many bytes (so actual data from client->server is not affected by this limit!) +#define MAX_PAYLOAD 1000 + // Protocol version should be increased whenever new features/messages are added, // so either the client or server can run in compatibility mode, or they can // cancel the connection right away if the protocol has changed too much @@ -51,9 +55,6 @@ // Length of comment fields (for alt server etc.) #define COMMENT_LENGTH 120 -// No payload allowed exceeding this many bytes (actual data from client->server is not affected by this limit!) -#define MAX_PAYLOAD 1000 - // in seconds if not stated otherwise (MS = milliseconds) #define SOCKET_TIMEOUT_SERVER_MS 30000 #define SOCKET_TIMEOUT_CLIENT_DATA 2 @@ -79,7 +80,7 @@ // +++++ Block Device +++++ #define KERNEL_SECTOR_SIZE 512 -#define DNBD3_BLOCK_SIZE 4096 // NEVER CHANGE THIS OR THE WORLD WILL END! +#define DNBD3_BLOCK_SIZE ((uint64_t)4096) // NEVER CHANGE THIS OR THE WORLD WILL END! #define NUMBER_DEVICES 8 #define DEFAULT_READ_AHEAD_KB 512 -- cgit v1.2.3-55-g7522