userver: userver/utils/iovec_advance.hpp File Reference
Loading...
Searching...
No Matches
iovec_advance.hpp File Reference

Detailed Description

Helpers for advancing iovec buffers used in scatter/gather I/O (readv/writev).

Definition in file iovec_advance.hpp.

Go to the source code of this file.

#include <sys/uio.h>
#include <cstddef>
#include <userver/utils/assert.hpp>

Classes

struct  utils::IovIter
 A cursor over an array of iovec entries, used to track progress across multiple scatter/gather buffers. More...

Namespaces

namespace  utils
 General-purpose utilities used across userver libraries.

Functions

void utils::Advance (struct iovec &iov, std::size_t n)
 Trims the first n bytes off a single iovec: moves iov_base forward and decreases iov_len by n.
void utils::Advance (IovIter &iter, std::size_t n)
 Advances the iterator by n transferred bytes across the iovec array.