#ifndef GUTIL_H #define GUTIL_H #include #include constexpr int MAX_BUFFER_SIZE = 1024 * 1024 * 10; class CMutBuffer { public: CMutBuffer() = default; public: void push(const char* data, int len); int index_of(const char* data, int len, int start_pos = 0); const char* get_data() const; int get_len() const; void remove_of(int start_pos, int len); void clear(); private: std::vector buffer_; }; #endif // GUTIL_H