]> git.sesse.net Git - greproxy/blobdiff - protocol.h
Split Protocol into Sender and Reader.
[greproxy] / protocol.h
index 8b06f0a34be907fcd5cc1ef51d06ab43458a32f5..65c4d1d10f538952a2fd6de679953e35168ccdad 100644 (file)
@@ -4,10 +4,15 @@
 #include <stdint.h>
 #include <string>
 
-class Protocol {
+class Sender {
 public:
        virtual void send_packet(uint16_t proto, const std::string &data, int incoming_seq) = 0;
+};
+
+class Reader {
+public:
        virtual int fd() const = 0;
+       virtual void read_packet(Sender* sender) = 0;
 };
 
 #endif  // !defined(_PROTOCOL_H)