]> git.sesse.net Git - cubemap/blobdiff - udpinput.h
Tweak the MutexLock implementation slightly, so as to confuse Coverity less.
[cubemap] / udpinput.h
index 0ee5dc9b986f0cfa63026aac5c75c163dc3f87ab..caff008793842cdce2b601e10ea8c61041ae889e 100644 (file)
@@ -21,6 +21,8 @@ public:
 
        virtual void add_destination(int stream_index);
 
+       virtual InputStats get_stats() const;
+
 private:
        // Actually gets the packets.
        virtual void do_work();
@@ -42,6 +44,12 @@ private:
 
        // Temporary buffer, sized for the maximum size of an UDP packet.
        char packet_buf[65536];
+
+       // Mutex protecting <stats>.
+       mutable pthread_mutex_t stats_mutex;
+
+       // The current statistics for this connection. Protected by <stats_mutex>.
+       InputStats stats;
 };
 
 #endif  // !defined(_UDPINPUT_H)