* A wrapper class to facilitate passing in externally owned data to a buffer via addBufferFragment.
* @param max_slices supplies an optional limit on the number of slices to fetch, for performance.
* connection originating the source buffer (e.g. an internal listener connection) may be deleted
virtual void move(Instance& rhs, uint64_t length, bool reset_drain_trackers_and_accounting) PURE;
virtual ssize_t search(const void* data, uint64_t size, size_t start, size_t length) const PURE;
* @details Size parameter: Some protocols have integer fields whose size in bytes won't match the
* size in bytes of C++'s integer types. Take a 3-byte integer field for example, which we want to
* reading signed types with negative values. To make matters easier, the optional Size parameter
* integer size in bytes. For the most common case when one needs to read exactly as many bytes as
constexpr const auto displacement = Endianness == ByteOrder::BigEndian ? sizeof(T) - Size : 0;
constexpr const auto displacement = Endianness == ByteOrder::BigEndian ? sizeof(T) - Size : 0;
* Set the buffer's high watermark. The buffer's low watermark is implicitly set to half the high
* Determine if the buffer watermark trigger condition is currently set. The watermark trigger is
virtual BufferMemoryAccountSharedPtr createAccount(Http::StreamResetHandler& reset_handler) PURE;
// An owner that can be set by the creator of the `ReservationSingleSlice` to free the slice upon
static ReservationSingleSlice bufferImplUseOnlyConstruct(Instance& buffer) { return {buffer}; }