summaryrefslogtreecommitdiffstats
path: root/src/server/net.h
diff options
context:
space:
mode:
authorSimon Rettberg2018-08-08 12:09:14 +0200
committerSimon Rettberg2018-08-08 12:09:14 +0200
commit2860f3393025e114f11feb1b576d2ac6353fbd23 (patch)
tree51a66fbf9dccff3ee0d7cc905cab7c7ab40911b5 /src/server/net.h
parent[SHARED] Use atomic for logger mask (diff)
downloaddnbd3-2860f3393025e114f11feb1b576d2ac6353fbd23.tar.gz
dnbd3-2860f3393025e114f11feb1b576d2ac6353fbd23.tar.xz
dnbd3-2860f3393025e114f11feb1b576d2ac6353fbd23.zip
[SERVER] Use atomic var for (total)bytesSent counters
Gets rid of the lastBytesSent field as well as the stats lock per client. Cleaned and split up the messy net_clientsToJson function while at it.
Diffstat (limited to 'src/server/net.h')
-rw-r--r--src/server/net.h8
1 files changed, 2 insertions, 6 deletions
diff --git a/src/server/net.h b/src/server/net.h
index 51f4db8..e91395c 100644
--- a/src/server/net.h
+++ b/src/server/net.h
@@ -29,13 +29,9 @@ void net_init();
void* net_handleNewConnection(void *clientPtr);
-void net_updateGlobalSentStatsFromClient(dnbd3_client_t * const client);
+struct json_t* net_getListAsJson();
-uint64_t net_getTotalBytesSent();
-
-void* net_client_handler(void *client_socket);
-
-struct json_t* net_clientsToJson();
+void net_getStats(int *clientCount, uint64_t *bytesSent);
void net_disconnectAll();