pdcomm::Secs1BorrowedIo
Class
A non-owning I/O binding built from raw C callbacks.
class Secs1BorrowedIoIt 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 &&) = deleteSecs1BorrowedIo
Constructor
Copying is disabled; endpoints refer to this binding by address.
Secs1BorrowedIo(const Secs1BorrowedIo &) = deleteSecs1BorrowedIo
Constructor
Fills the callback table.
Secs1BorrowedIo(void *context, PdcommSecs1Read read, PdcommSecs1Write write) noexceptNothing is validated here. The Secs1Endpoint constructor rejects a nullptr context or callback with PDCOMM_INVALID_ARGUMENT.
Parameters
| Name | Description |
|---|---|
context | Opaque pointer passed to both callbacks; must not be nullptr. It is borrowed, not owned. |
read | Nonblocking read callback. The endpoint calls it only inside Secs1Endpoint::poll(), on the endpoint's thread. |
write | Nonblocking 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 noexceptReturns
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 &&) = deleteoperator=
Method
Copy assignment is disabled; endpoints refer to this binding by address.
Secs1BorrowedIo &operator=(const Secs1BorrowedIo &) = delete