]> git.sesse.net Git - greproxy/blob - rsencoder.h
Unbreak pacing in tungre.
[greproxy] / rsencoder.h
1 #ifndef _RSENCODER_H
2 #define _RSENCODER_H 1
3
4 #include <stdint.h>
5 #include <fecpp.h>
6
7 #include <string>
8 #include <vector>
9
10 #include "protocol.h"
11
12 class Sender;
13
14 class RSEncoder : public Sender {
15 public:
16         RSEncoder(Sender* sender);
17         virtual void send_packet(uint16_t proto, const std::string &data, int incoming_seq);
18
19 private:
20         void finish_group();
21
22         Sender *sender;
23         std::vector<GREPacket> packet_history;
24         fecpp::fec_code rs;
25 };
26
27 #endif  // !defined(_RSENCODER_H)