21#ifndef IPC_DOXYGEN_ONLY
22static_assert(
false,
"As of this writing this is a documentation-only \"header\" "
23 "(the \"source\" is for humans and Doxygen only).");
448 template<
typename Task_err>
807 template<
typename Msg_resource>
986 template<
typename Task_err_sz>
989 Task_err_sz&& on_done_func);
1089 template<
typename Msg_resource,
typename Task_err>
1091 Task_err&& on_done_func);
1272template<
typename Msg_resource_t,
bool NO_HNDLS>
1274 private boost::noncopyable
A documentation-only concept defining the behavior of an object that is a key aspect of batch-receivi...
bool initialized() const
Returns true if and only if *this is ready for actual batch-receive ops – that is prepare_target_payl...
void prepare_target_payload(const Mutable_buffer_sequence &target_blob, Msg_resource &&msg_resource, size_t idx=-1)
Either prepares-for-reading-to a reserved (in ctor) but not yet initialized slot; or re-prepares an a...
void clear_used()
Makes it so that n_used() would return zero.
bool full() const
Meaningful only if n_used() is, this returns true if and only if n_used() == max_msg_count,...
Native_handle result_payload_hndl(size_t idx) const
Obtains a copy of the Native_handle (potentially .null()) in an earlier-received-to slot.
size_t result_payload_blob(size_t idx, Msg_resource **msg_resource_ptr=nullptr)
Obtains information, chiefly the size of received data not-exceeding corresponding target_blob....
~Msg_batch_in()
Clears all resources – including any Msg_resource currently attached to any receive-slot.
size_t target_payload_size() const
Returns the total max-size of each slot's message, or zero if prepare_target_payload() has not yet be...
Msg_batch_in(size_t max_msg_count)
Constructs batch with max_msg_count receive-message slots.
util::Blob_mutable Mutable_buffer_sequence
Buffer(s) description type (conforming to boost.asio MutableBufferSequence concept) supported by *thi...
size_t n_used() const
In range [0, max_msg_count] (see ctor), this is the number of slots, starting with the 1st slot ([0])...
Msg_resource_t Msg_resource
Alias for template parameter.
static constexpr bool S_NO_HNDLS
Constant mirroring template parameter.
A documentation-only concept defining the behavior of an object capable of reliably/in-order receivin...
Native_handle_receiver(Native_handle_receiver &&src)
Move-constructs from src; src becomes as-if default-cted (therefore in NULL state).
bool async_receive_native_handle_batch(Native_handle_batch_in< Msg_resource > *batch, bool assume_would_block, Task_err &&on_done_func)
In PEER state: Asynchronously awaits 1+ discrete message(s) – as sent by the opposing peer via Native...
bool idle_timer_run(util::Fine_duration timeout=default_value)
In PEER state: Irreversibly enables a conceptual idle timer whose potential side effect is,...
Native_handle_receiver & operator=(const Native_handle_receiver &)=delete
Disallow copying.
static constexpr bool S_META_BLOB_UNDERFLOW_ALLOWED
If false then meta_blob.size() < receive_meta_blob_max_size() in PEER-state async_receive_native_hand...
value Native_handle_rcv_stats
Return type, typically a struct, for native_handle_receive_stats().
Native_handle_receiver()
Default ctor: Creates a peer object in NULL (neither connected nor connecting) state.
Native_handle_receiver & operator=(Native_handle_receiver &&src)
Move-assigns from src; *this acts as if destructed; src becomes as-if default-cted (therefore in NULL...
static const Shared_name S_RESOURCE_TYPE_ID
Shared_name relative-folder fragment (no separators) identifying this resource type....
static constexpr size_t S_RCV_NATIVE_HANDLE_BATCH_SZ_RECOMMENDATION
A positive number: the suggested value to pass for the max_msg_count arg to Msg_batch_in ctor of obje...
Native_handle_receiver(sync_io::Native_handle_receiver &&sync_io_core_in_peer_state_moved)
sync_io-core-adopting ctor: Creates a peer object in PEER state by subsuming a sync_io core in that s...
void native_handle_receive_stats_reset()
Resets the transport statistics as of this call.
bool async_receive_native_handle(Native_handle *target_hndl, const util::Blob_mutable &target_meta_blob, Task_err_sz &&on_done_func)
In PEER state: Asynchronously awaits one discrete message – as sent by the opposing peer via Native_h...
Native_handle_rcv_stats native_handle_receive_stats() const
Returns the accumulated transport statistics as of this call.
~Native_handle_receiver()
Destroys this peer endpoint which will end the conceptual incoming-direction pipe (in PEER state,...
size_t receive_meta_blob_max_size() const
In PEER state: Returns min target-meta-blob size such that (1) async_receive_native_handle() shall no...
Native_handle_receiver(const Native_handle_receiver &)=delete
Disallow copying.
A documentation-only concept defining the behavior of an object capable of reliably/in-order sending ...
Native_handle_snd_stats native_handle_send_stats() const
Returns the accumulated transport statistics as of this call.
Native_handle_sender(Native_handle_sender &&src)
Move-constructs from src; src becomes as-if default-cted (therefore in NULL state).
void native_handle_send_stats_reset()
Resets the transport statistics as of this call.
bool async_end_sending(Task_err &&on_done_func)
Equivalent to send_native_handle() but sends a graceful-close message instead of the usual payload; t...
Native_handle_sender(const Native_handle_sender &)=delete
Disallow copying.
Native_handle_sender(sync_io::Native_handle_sender &&sync_io_core_in_peer_state_moved)
sync_io-core-adopting ctor: Creates a peer object in PEER state by subsuming a sync_io core in that s...
size_t send_meta_blob_max_size() const
In PEER state: Returns max meta_blob.size() such that send_native_handle() shall not fail due to too-...
Native_handle_sender & operator=(Native_handle_sender &&src)
Move-assigns from src; *this acts as if destructed; src becomes as-if default-cted (therefore in NULL...
static const Shared_name S_RESOURCE_TYPE_ID
Shared_name relative-folder fragment (no separators) identifying this resource type....
bool send_native_handle(Native_handle hndl_or_null, const util::Blob_const &meta_blob, Error_code *err_code=nullptr)
In PEER state: Synchronously, non-blockingly sends one discrete message, reliably/in-order,...
bool auto_ping(util::Fine_duration period=default_value)
In PEER state: Irreversibly enables periodic auto-pinging of opposing receiver with low-level message...
Native_handle_sender & operator=(const Native_handle_sender &)=delete
Disallow copying.
value Native_handle_snd_stats
Return type, typically a struct, for native_handle_send_stats().
~Native_handle_sender()
Destroys this peer endpoint which will end the conceptual outgoing-direction pipe (in PEER state,...
bool end_sending()
Equivalent to async_end_sending(F) wherein F() does nothing.
Native_handle_sender()
Default ctor: Creates a peer object in NULL (neither connected nor connecting) state.
A documentation-only concept defining the behavior of an object that is the sync_io-pattern counterpa...
A documentation-only concept defining the behavior of an object that is the sync_io-pattern counterpa...
String-wrapping abstraction representing a name uniquely distinguishing a kernel-persistent entity fr...
Flow-IPC module providing transmission of structured messages and/or low-level blobs (and more) betwe...
boost::asio::mutable_buffer Blob_mutable
Short-hand for a mutable blob somewhere in memory, stored as exactly a void* and a size_t.
flow::Fine_duration Fine_duration
Short-hand for Flow's Fine_duration.
boost::asio::const_buffer Blob_const
Short-hand for an immutable blob somewhere in memory, stored as exactly a void const * and a size_t.
flow::Error_code Error_code
Short-hand for flow::Error_code which is very common.
A monolayer-thin wrapper around a native handle, a/k/a descriptor a/k/a FD.