From 05027a457a5ce2788fdb9838d999f9470ed645be Mon Sep 17 00:00:00 2001 From: Stephan Schwaer Date: Mon, 27 Apr 2015 18:39:47 +0200 Subject: [SERVER] Added counters for received and sent bytes. --- src/server/globals.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'src/server/globals.h') diff --git a/src/server/globals.h b/src/server/globals.h index 3c800aa..9f6a46d 100644 --- a/src/server/globals.h +++ b/src/server/globals.h @@ -57,6 +57,7 @@ struct _dnbd3_connection volatile bool shutdown; // signal this 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 uint64_t replicationHandle; // Handle of pending replication request + uint64_t bytesReceived; // Number of bytes received by the connection. }; typedef struct @@ -117,6 +118,7 @@ struct _dnbd3_client int sock; dnbd3_host_t host; dnbd3_image_t *image; + uint64_t bytesSent; pthread_spinlock_t lock; pthread_mutex_t sendMutex; bool isServer; // true if a server in proxy mode, false if real client -- cgit v1.2.3-55-g7522