24#include <boost/move/make_unique.hpp>
25#include <experimental/propagate_const>
73template<
typename Persistent_mq_handle>
96 template<
typename Msg_resource>
261 template<
typename Task_err_sz>
285 template<
typename Msg_resource,
typename Task_err>
323 const std::string&
nickname()
const;
338 using Impl_ptr = std::experimental::propagate_const<boost::movelib::unique_ptr<Impl>>;
343 template<
typename Persistent_mq_handle2>
358template<
typename Persistent_mq_handle>
365template<
typename Persistent_mq_handle>
367template<
typename Persistent_mq_handle>
372template<
typename Persistent_mq_handle>
377template<
typename Persistent_mq_handle>
380 m_impl(boost::movelib::make_unique<
Impl>
381 (logger_ptr, nickname_str, std::move(mq), err_code))
386template<
typename Persistent_mq_handle>
389 m_impl(boost::movelib::make_unique<
Impl>
390 (std::move(sync_io_core_in_peer_state_moved)))
396template<
typename Persistent_mq_handle>
399template<
typename Persistent_mq_handle>
402 return m_impl ? m_impl->receive_blob_max_size() : 0;
405template<
typename Persistent_mq_handle>
406template<
typename Task_err_sz>
410 return m_impl ? (m_impl->async_receive_blob(target_blob, std::move(on_done_func)),
true)
414template<
typename Persistent_mq_handle>
415template<
typename Msg_resource,
typename Task_err>
419 return m_impl ? (m_impl->template async_receive_blob_batch<Msg_resource>
420 (batch, assume_would_block, std::move(on_done_func)),
426template<
typename Persistent_mq_handle>
429 return m_impl ? m_impl->idle_timer_run(timeout)
433template<
typename Persistent_mq_handle>
436 return m_impl ? m_impl->blob_receive_stats()
442template<
typename Persistent_mq_handle>
445 if (m_impl) { m_impl->blob_receive_stats_reset(); }
448template<
typename Persistent_mq_handle>
454template<
typename Persistent_mq_handle>
462template<
typename Persistent_mq_handle>
465 return val.
m_impl ? (os << *val.
m_impl) : (os <<
"null");
Base of Blob_stream_mq_sender and Blob_stream_mq_receiver containing certain static facilities,...
Similar to Blob_stream_mq_base but contains non-class-template-parameter-dependent Blob_stream_mq_rec...
Internal, non-movable pImpl-lite implementation of Blob_stream_mq_receiver class template.
typename Base::Mq Mq
Short-hand for template arg for underlying MQ handle type.
Implements Blob_receiver concept by using an adopted Persistent_mq_handle MQ handle to an MQ (message...
bool idle_timer_run(util::Fine_duration timeout=boost::chrono::seconds{5})
Implements Blob_receiver API per contract.
Impl_ptr m_impl
The true implementation of this class. See also our class doc header.
const std::string & nickname() const
Returns nickname, a brief string suitable for logging.
static constexpr bool S_BLOB_UNDERFLOW_ALLOWED
Implements concept API; namely it is false.
const Shared_name & absolute_name() const
Returns name equal to mq.absolute_name(), where mq was passed to ctor, at the time it was passed to c...
Blob_stream_mq_receiver & operator=(Blob_stream_mq_receiver &&src)
Move-assigns from src; *this acts as if destructed; src becomes as-if default-cted (therefore in NULL...
Blob_stream_mq_receiver()
Implements Blob_receiver API, per its concept contract.
std::experimental::propagate_const< boost::movelib::unique_ptr< Impl > > Impl_ptr
Short-hand for const-respecting wrapper around Impl for the pImpl idiom.
~Blob_stream_mq_receiver()
Implements Blob_receiver API.
bool async_receive_blob_batch(Blob_batch_in< Msg_resource > *batch, bool assume_would_block, Task_err &&on_done_func)
Implements Blob_receiver API per contract.
typename Impl::Mq Mq
Short-hand for template arg for underlying MQ handle type.
Blob_rcv_stats blob_receive_stats() const
Implements Blob_receiver API per contract.
size_t receive_blob_max_size() const
Implements Blob_receiver API per contract.
Blob_stream_mq_receiver(Blob_stream_mq_receiver &&src)
Move-constructs from src; src becomes as-if default-cted (therefore in NULL state).
static constexpr size_t S_RCV_BLOB_BATCH_SZ_RECOMMENDATION
Implements concept API; namely it is 1 as of this writing (no native batch-receiving in Persistent_mq...
void blob_receive_stats_reset()
Implements Blob_receiver API per contract.
Blob_stream_mq_receiver & operator=(const Blob_stream_mq_receiver &)=delete
Copy assignment is disallowed.
bool async_receive_blob(const util::Blob_mutable &target_blob, Task_err_sz &&on_done_func)
Implements Blob_receiver API per contract.
transport::stat::Blob_rcv_stats Blob_rcv_stats
Implements Blob_receiver concept API.
static const Shared_name S_RESOURCE_TYPE_ID
Implements concept API. Equals Mq::S_RESOURCE_TYPE_ID.
friend std::ostream & operator<<(std::ostream &os, const Blob_stream_mq_receiver< Persistent_mq_handle2 > &val)
Friend of Blob_stream_mq_sender.
Straightforward Msg_batch_in concept implementation (as taken by API {Blob|Native_handle}_receiver::a...
Dummy type for use as a template param to Channel when either the blobs pipe or handles pipe is disab...
static constexpr size_t S_RCV_BLOB_BATCH_SZ_RECOMMENDATION
Implements concept API; namely it is 1 as of this writing (no native batch-receiving in Persistent_mq...
String-wrapping abstraction representing a name uniquely distinguishing a kernel-persistent entity fr...
static const Shared_name S_EMPTY
A (default-cted) Shared_name. May be useful for functions returning const Shared_name&.
Flow-IPC module providing transmission of structured messages and/or low-level blobs (and more) betwe...
std::ostream & operator<<(std::ostream &os, const Generic_msg_batch_in< Msg_resource_t, NO_HNDLS > &val)
Prints string representation of the given Generic_msg_batch_in to the given ostream.
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.
const std::string EMPTY_STRING
A (default-cted) string. May be useful for functions returning const std::string&.
flow::util::String_view String_view
Short-hand for Flow's String_view.
flow::Error_code Error_code
Short-hand for flow::Error_code which is very common.
Cumulative stats from the incoming-direction (receive) pipe of a Blob_receiver or Native_handle_recei...