]> git.sesse.net Git - nageru/blobdiff - httpd.h
Give a warning before quitting if there are clients connected.
[nageru] / httpd.h
diff --git a/httpd.h b/httpd.h
index 6e37c5226206b3cd8f5cd5b3dcc8ea9b8b0bcecd..630b0c38bfefb53205050e4eb9563e06455ba69d 100644 (file)
--- a/httpd.h
+++ b/httpd.h
@@ -28,6 +28,9 @@ public:
 
        void start(int port);
        void add_data(const char *buf, size_t size, bool keyframe);
+       int64_t get_num_connected_clients() const {
+               return metric_num_connected_clients.load();
+       }
 
 private:
        static int answer_to_connection_thunk(void *cls, MHD_Connection *connection,