From cce7cf2c1428d174dd49177358dc52b234e97e5c Mon Sep 17 00:00:00 2001 From: Simon Rettberg Date: Mon, 22 Dec 2014 15:51:30 +0100 Subject: [SERVER] Configurable client timeout, adaptive replication speed (to be tested against varying bw/latency), retry sendfile call if ret <= len --- src/server/globals.h | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) (limited to 'src/server/globals.h') diff --git a/src/server/globals.h b/src/server/globals.h index 1b17660..c215916 100644 --- a/src/server/globals.h +++ b/src/server/globals.h @@ -56,7 +56,8 @@ struct _dnbd3_connection int recvBufferLen; // Len of ^^ volatile int shutdown; // bool to signal thread to stop, must only be set from uplink_shutdown() or cleanup in uplink_mainloop() int replicatedLastBlock; // bool telling if the last block has been replicated yet - time_t lastReplication; // timestamp of when last replication requests were sent + //time_t lastReplication; // timestamp of when last replication requests were sent + uint64_t replicationHandle; // Handle of pending replication request }; typedef struct @@ -167,10 +168,15 @@ extern int _isProxy; extern int _proxyPrivateOnly; /** - * Read timeout when waiting for data on an uplink + * Read timeout when waiting for or sending data on an uplink */ extern int _uplinkTimeout; +/** + * Read timeout when waiting for or sending data fron/to client + */ +extern int _clientTimeout; + void globals_loadConfig(); #endif /* GLOBALS_H_ */ -- cgit v1.2.3-55-g7522