]> git.sesse.net Git - greproxy/blob - greprotocol.h
Make Reorderer handle multi-timeouts.
[greproxy] / greprotocol.h
1 #ifndef _GREPROTOCOL_H
2 #define _GREPROTOCOL_H
3
4 #include <arpa/inet.h>
5 #include <netinet/in.h>
6 #include <stdint.h>
7 #include <string>
8
9 #include "protocol.h"
10
11 class GREProtocol : public Sender, public Reader {
12 public:
13         GREProtocol(const in6_addr &myaddr, const in6_addr &dst);
14         virtual void send_packet(uint16_t proto, const std::string &data, int incoming_seq);
15         virtual int fd() const;
16         virtual void read_packet(Sender* sender);
17
18 private:
19         int sock;
20         sockaddr_in6 dstaddr;
21 };
22
23 #endif  // !defined(_GREPROTOCOL_H)