diff options
author | Simon Rettberg | 2013-07-31 21:45:00 +0200 |
---|---|---|
committer | Simon Rettberg | 2013-07-31 21:45:00 +0200 |
commit | e7b3781c3e5c105fcd80a75546b9ab75eae8a2c9 (patch) | |
tree | 90e523671bb2ea349639b744b5bc3ee81f512fb7 /src/config.h | |
parent | [SERVER] Still working on the uplink... Almost there (diff) | |
download | dnbd3-e7b3781c3e5c105fcd80a75546b9ab75eae8a2c9.tar.gz dnbd3-e7b3781c3e5c105fcd80a75546b9ab75eae8a2c9.tar.xz dnbd3-e7b3781c3e5c105fcd80a75546b9ab75eae8a2c9.zip |
[SERVER] Uplink handing complete (untested, as alt servers can't be defined yet, so prepare for lots of fixes ;))
Diffstat (limited to 'src/config.h')
-rw-r--r-- | src/config.h | 13 |
1 files changed, 7 insertions, 6 deletions
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 |