X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=reorderer.h;h=393e327f7dbe86053fb374fd9601720c3a9e8195;hb=8e81c01b2de70c5e7e1a73d25ebbece0a95bd2c8;hp=476093fc5e8e136d9fc4d3008d5f6eb81e82e489;hpb=53c480e8b42d1257f99acf0d9a8d47f4aae8690d;p=greproxy diff --git a/reorderer.h b/reorderer.h index 476093f..393e327 100644 --- a/reorderer.h +++ b/reorderer.h @@ -1,6 +1,7 @@ #ifndef _REORDERER_H #define _REORDERER_H 1 +#include #include #include @@ -9,7 +10,7 @@ #include #include -class Protocol; +#include "protocol.h" struct GREPacket { int seq; @@ -21,13 +22,14 @@ struct GREPacket { } }; -class Reorderer { +class Reorderer : public Protocol { public: Reorderer(Protocol* sender); - void handle_packet(uint16_t proto, const std::string& data, int seq); + void send_packet(uint16_t proto, const std::string& data, int seq); + virtual int fd() const { assert(false); } private: - void send_packet(uint16_t proto, const std::string &data, bool silence); + void check_ts_discontinuity(uint16_t proto, const std::string &data, bool silence); Protocol* sender; int last_seq;