Skip to content
Start free evaluation

pdcomm::Secs1BorrowedIo

Class

A non-owning I/O binding built from raw C callbacks.

class Secs1BorrowedIo

Declared in: #include <pdcomm_secs1.hpp>

It fills a PdcommSecs1Io table with your context and your PdcommSecs1Read and PdcommSecs1Write callbacks. This object, its context, and callback code must outlive every Secs1Endpoint constructed from it. Raw callbacks must not let C++ exceptions escape across the C ABI. Prefer Secs1IoAdapter for C++ code.

Notes

  • Neither copyable nor movable, so its address stays stable while endpoints use it.

Members

Secs1BorrowedIo

Constructor

Moving is disabled; endpoints refer to this binding by address.

Secs1BorrowedIo(Secs1BorrowedIo &&) = delete

Declared in: #include <pdcomm_secs1.hpp>

Secs1BorrowedIo

Constructor

Copying is disabled; endpoints refer to this binding by address.

Secs1BorrowedIo(const Secs1BorrowedIo &) = delete

Declared in: #include <pdcomm_secs1.hpp>

Secs1BorrowedIo

Constructor

Fills the callback table.

Secs1BorrowedIo(void *context, PdcommSecs1Read read, PdcommSecs1Write write) noexcept

Declared in: #include <pdcomm_secs1.hpp>

Nothing is validated here. The Secs1Endpoint constructor rejects a nullptr context or callback with PDCOMM_INVALID_ARGUMENT.

Parameters

NameDescription
contextOpaque pointer passed to both callbacks; must not be nullptr. It is borrowed, not owned.
readNonblocking read callback. The endpoint calls it only inside Secs1Endpoint::poll(), on the endpoint's thread.
writeNonblocking write callback. The endpoint calls it only inside Secs1Endpoint::poll(), on the endpoint's thread.

native

Method

Returns the callback table that Secs1Endpoint passes to pdcomm_secs1_create().

const PdcommSecs1Io &native() const noexcept

Declared in: #include <pdcomm_secs1.hpp>

Returns

The table with struct_size set; valid as long as this object lives.

operator=

Method

Move assignment is disabled; endpoints refer to this binding by address.

Secs1BorrowedIo &operator=(Secs1BorrowedIo &&) = delete

Declared in: #include <pdcomm_secs1.hpp>

operator=

Method

Copy assignment is disabled; endpoints refer to this binding by address.

Secs1BorrowedIo &operator=(const Secs1BorrowedIo &) = delete

Declared in: #include <pdcomm_secs1.hpp>