--- /dev/null
+#ifndef _PACER_H
+#define _PACER_H 1
+
+#include <stdint.h>
+#include <sys/time.h>
+#include <deque>
+#include <string>
+
+#include "protocol.h"
+#include "reorderer.h"
+
+struct Pacer : public Sender {
+public:
+ Pacer(Sender *sender, int max_rate_kbit_per_sec, int burst_num_packets);
+ virtual void send_packet(uint16_t proto, const std::string &data, int incoming_seq);
+
+ void possibly_adjust_tv(timeval *tv);
+ void possibly_flush_packets();
+
+private:
+ Sender *sender;
+ int burst_num_packets;
+ double seconds_per_byte;
+ timeval next_send_packet;
+ std::deque<GREPacket> waiting_packets;
+};
+
+#endif // !defined(_PACER_H)