]> git.sesse.net Git - greproxy/blobdiff - reorderer.h
Make tungre output statistics on stderr every 10 seconds.
[greproxy] / reorderer.h
index 622083e0563da0f968161e98654f144cc2666fd1..920c57c50a9af6470190f88ecc5550a38b1eedc0 100644 (file)
@@ -30,6 +30,9 @@ public:
        void send_packet(uint16_t proto, const std::string& data, int seq);
        void possibly_adjust_tv(timeval *tv);
 
+       int get_reorders() const { return num_reorders; }
+       int get_lost_packets() const { return num_lost_packets; }
+
 private:
        void check_ts_discontinuity(uint16_t proto, const std::string &data, bool silence);
 
@@ -39,6 +42,8 @@ private:
 
        std::priority_queue<GREPacket, std::vector<GREPacket>, std::greater<GREPacket>> packet_buffer;
        std::map<int, int> ccs;
+
+       int num_reorders = 0, num_lost_packets = 0;
 };
 
 #endif  // !defined(_REORDERER_H)