]> git.sesse.net Git - greproxy/blob - protocol.h
Merge branch 'master' of /srv/git.sesse.net/www/greproxy
[greproxy] / protocol.h
1 #ifndef _PROTOCOL_H
2 #define _PROTOCOL_H 1
3
4 #include <stdint.h>
5 #include <string>
6
7 class Sender {
8 public:
9         virtual void send_packet(uint16_t proto, const std::string &data, uint32_t incoming_seq) = 0;
10 };
11
12 class Reader {
13 public:
14         virtual int fd() const = 0;
15         virtual void read_packet(Sender* sender) = 0;
16 };
17
18 #endif  // !defined(_PROTOCOL_H)