X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=reorderer.h;h=393e327f7dbe86053fb374fd9601720c3a9e8195;hb=66d3e5110affbc70766211aeff46c4f41e532ed1;hp=476093fc5e8e136d9fc4d3008d5f6eb81e82e489;hpb=7c67b21504e7758f4148386befc8cd80455a1a85;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;