12#ifndef OPENVPN_BUFFER_BUFCOMPLETE_H
13#define OPENVPN_BUFFER_BUFCOMPLETE_H
34 const size_t s = std::min(size,
buf.
size());
49 return advance(
size_t(h) << 8 |
size_t(l));
63 bool get(std::uint8_t &c)
virtual void next_buffer()=0
bool advance(size_t size)
bool get(std::uint8_t &c)
virtual ~BufferComplete()=default
void reset_buf(const Buffer &buf_arg)
bool defined() const
Returns true if the buffer is not empty.
size_t size() const
Returns the size of the buffer in T objects.
void advance(const size_t delta)
Advances the buffer by the specified delta.
T pop_front()
Removes and returns the first element from the buffer.
void reset_content()
Resets the content of the buffer.