NPRPC docs

class Fd_Direct

C++

class Fd_Direct

Accessor for an fd field of a message in a buffer.

include/nprpc/flat.hpp:528

Constructors

Fd_Direct(flat_buffer &buffer, std::uint32_t offset)

The field at offset in buffer; created by generated code.

include/nprpc/flat.hpp:546

Methods

std::uint32_t offset() const noexcept

Not documented.

include/nprpc/flat.hpp:552

void set(UniqueFd &&fd)

Attaches fd to the message and points the field at it.

include/nprpc/flat.hpp:555

void set(int fd)

Attaches a duplicate of fd, which stays the caller's.

include/nprpc/flat.hpp:557

UniqueFd take()

Takes the descriptor out of the message; throws ExceptionBadInput if the field names none.

include/nprpc/flat.hpp:564

bool valid() const noexcept

Whether the field names a descriptor that arrived with the message.

include/nprpc/flat.hpp:560