12#ifndef OPENVPN_BUFFER_BUFLIST_H
13#define OPENVPN_BUFFER_BUFLIST_H
23template <
template <
typename...>
class COLLECTION>
30 using COLLECTION<
BufferPtr>::emplace_back;
33 const size_t tailroom,
34 const bool size_1_optim)
const
41 && front()->offset() >= headroom
42 && front()->remaining() >= tailroom)
50 big->init_headroom(headroom);
54 big->write(b->c_data(), b->size());
61 return join(0, 0,
true);
88 const size_t s = buf.
size();
97 const size_t r = b->remaining(tailroom);
size_t size() const
Returns the size of the buffer in T objects.
auto * read_alloc(const size_t size)
Allocate memory and read data from the buffer into the allocated memory.
static Ptr Create(ArgsT &&...args)
Creates a new instance of RcEnable with the given arguments.
Support deferred server-side state creation when client connects.
BufferCollection< std::list > BufferList
BufferCollection< std::vector > BufferVector
std::string buf_to_string(const Buffer &buf)
BufferPtr join(const size_t headroom, const size_t tailroom, const bool size_1_optim) const
std::string to_string() const
BufferCollection copy() const
void put_consume(BufferAllocated &buf, const size_t tailroom=0)