-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathconfig.h
31 lines (21 loc) · 861 Bytes
/
config.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
#ifndef __TINY_DB_CONFIG
#define __TINY_DB_CONFIG
// port that TCP connection will be open
#define PORT 8079
// host that TCP connection will be open
#define HOST (u_int32_t)0x00000000
// total command message length in bytes
#define COMMAND_BUFFER_SIZE 1000000
// total connections that server can queue
#define CONN_QUEUE_SIZE 128
// snapshot name that db will look for on startup
#define DEFAULT_SNAPSHOT_NAME "snapshot.bin"
// snapshot that will be created every time program will terminate
#define DEFAULT_EXIT_SNAPSHOT_NAME "on_exit_snapshot.bin"
// number of initial databases to be initalized by default on startup
#define NUM_INITAL_DATABASES 1
// this must be a power of 2 (e.g., 2, 4, 8, 16, 32 ...)
#define NUM_SHARDS 16
// max size of string buffer size in the list
#define MAX_STRING_LENGTH COMMAND_BUFFER_SIZE
#endif // __TINY_DB_CONFIG