X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=greprotocol.h;h=c54efd699cc530fcafcbb40ab2c67582210e18fd;hb=HEAD;hp=739b97e17177a0a3e9936804caf3d45fcadcb5e0;hpb=02120e9414a6e613b17d6284891593271659b5d9;p=greproxy diff --git a/greprotocol.h b/greprotocol.h index 739b97e..c54efd6 100644 --- a/greprotocol.h +++ b/greprotocol.h @@ -11,13 +11,18 @@ class GREProtocol : public Sender, public Reader { public: GREProtocol(const in6_addr &myaddr, const in6_addr &dst); - virtual void send_packet(uint16_t proto, const std::string &data, int incoming_seq); + virtual void send_packet(uint16_t proto, const std::string &data, uint32_t incoming_seq); virtual int fd() const; virtual void read_packet(Sender* sender); + int get_received_packets() const { return received_packets; } + int get_sent_packets() const { return sent_packets; } + private: int sock; sockaddr_in6 dstaddr; + + int received_packets = 0, sent_packets = 0; }; #endif // !defined(_GREPROTOCOL_H)