#ifndef _REORDERER_H
#define _REORDERER_H 1
+#include <assert.h>
#include <stdint.h>
#include <algorithm>
#include <string>
#include <vector>
-class Protocol;
+#include "protocol.h"
struct GREPacket {
int seq;
}
};
-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;