Flow-IPC 3.0.0
Flow-IPC project: Full implementation reference.
Namespaces | Typedefs | Functions | Variables
struc_fwd.hpp File Reference
#include "ipc/transport/transport_fwd.hpp"
#include "ipc/util/util_fwd.hpp"
#include <flow/util/blob.hpp>
#include <flow/util/stat/stat_fwd.hpp>
#include <flow/util/stat/stat_set_list.hpp>
#include <capnp/message.h>
#include <boost/uuid/uuid.hpp>
#include <vector>

Go to the source code of this file.

Namespaces

namespace  ipc
 Catch-all namespace for the Flow-IPC project: A library/API in modern C++17 providing high-performance communication between processes.
 
namespace  ipc::transport
 Flow-IPC module providing transmission of structured messages and/or low-level blobs (and more) between pairs of processes.
 
namespace  ipc::transport::struc
 Sub-module of Flow-IPC module ipc::transport providing transmission of structured messages specifically.
 
namespace  ipc::transport::struc::stat
 Stats-related sub-namespace, for ADL segregation and general organization.
 
namespace  ipc::transport::struc::sync_io
 sync_io-pattern counterparts to async-I/O-pattern object types in parent namespace ipc::transport::struc.
 
namespace  ipc::transport::struc::sync_io::stat
 Stats-related sub-namespace, for ADL segregation and general organization.
 
namespace  capnp
 Small group of miscellaneous utilities to ease work with capnp (Cap'n Proto), joining its capnp namespace.
 

Typedefs

using ipc::transport::struc::Session_token = boost::uuids::uuid
 A type used by struc::Channel for internal safety/security/auth needs. More...
 
using ipc::transport::struc::Segment_ptrs = std::vector< flow::util::Blob_sans_log_context * >
 Sequence of 1+ segment descriptions, each representing a live writable segment (of a capnp serialization of a capnp-struct) and optional header/prefix area immediately preceding it. More...
 
using ipc::transport::struc::Segment_bufs = std::vector< util::Blob_const >
 Simpler cousin of Segment_ptrs, this represents the IPC-transmissible representation of a capnp serialization of a capnp-struct including any framing header(s), expressed as simply a sequence of N read-only views, each containing a pointer to header-if-any-followed-by-serialization-segment and the size in bytes thereof. More...
 
using ipc::transport::struc::Split_segments = std::vector< Split_segment >
 A simple data structure describing the segments (if any) in a Segment_bufs (or similar) structure which had to be split (presumably due to size constraints); by following the indices/sizes into a post-split Segment_bufs one can join the appropriate elements so as to obtain the original pre-split segments. More...
 
using ipc::transport::struc::Segment_blob_in = flow::util::Blob_sans_log_context
 Short-hand for a high-performance blob structure that represents an IPC-incoming (sub-)segment 1+ of which make up the outer serialization of a given Msg_in. More...
 
using ipc::transport::struc::msg_id_t = uint64_t
 Message ID uniquely identifying outgoing message (Msg_out, among all other Msg_outs), per channel; and similarly incoming message (Msg_in, among Msg_ins), per channel. More...
 
using ipc::transport::struc::Capnp_msg_builder_interface = ::capnp::MessageBuilder
 Alias for capnp's MessageBuilder interface. Rationale: as part of our API, we use our identifier style. More...
 
using ipc::transport::struc::Capnp_msg_reader_interface = ::capnp::MessageReader
 Alias for capnp's MessageReader interface. Rationale: as part of our API, we use our identifier style. More...
 
using ipc::transport::struc::stat::Heap_serializer_stats = Serializer_stats_p< Heap_serializer_stats_cfg >
 Default-constructible Serializer_stats variant for pure-heap user messages. See Serializer_stats doc header. More...
 
using ipc::transport::struc::stat::Heap_serializer_global_stats = flow::util::stat::Global_stats< Pure_heap_tag, Heap_serializer_stats, 1 >
 Pure-heap (non-SHM) cumulative-Heap_serializer_stats singleton: convenience alias for the default flow::util::stat::Global_stats instantiated with Pure_heap_tag. More...
 

Functions

template<typename Capnp_reader >
Ostreamable_capnp_brief< Capnp_reader > ipc::transport::struc::ostreamable_capnp_brief (const Capnp_reader &capnp_reader)
 Convenience function that returns an object passable to ostream<< to print a one-line/potentially-truncated representation to that stream, given an arbitrary capnp Reader. More...
 
template<typename Capnp_reader >
Ostreamable_capnp_full< Capnp_reader > ipc::transport::struc::ostreamable_capnp_full (const Capnp_reader &capnp_reader)
 Convenience function that returns an object passable to ostream<< to print a multi-line/pretty-printed/indented/full-length representation to that stream, given an arbitrary capnp Reader. More...
 
template<typename Capnp_reader >
std::ostream & ipc::transport::struc::operator<< (std::ostream &os, const Ostreamable_capnp_brief< Capnp_reader > &val)
 Prints string representation (one-line/potentially-truncated form) of the given capnp Reader, via proxy object, to the given ostream. More...
 
template<typename Capnp_reader >
std::ostream & ipc::transport::struc::operator<< (std::ostream &os, const Ostreamable_capnp_full< Capnp_reader > &val)
 Prints string representation (multi-line/pretty-printed/indented/full-length form) of the given capnp Reader, via proxy object, to the given ostream. More...
 
template<typename Owned_channel_t , typename Msg_body_t , typename Builder_config_t , typename Reader_config_t >
std::ostream & ipc::transport::struc::operator<< (std::ostream &os, const Channel< Owned_channel_t, Msg_body_t, Builder_config_t, Reader_config_t > &val)
 Prints string representation of the given struc::Channel to the given ostream. More...
 
template<typename Body_t , typename Struct_builder_t >
std::ostream & ipc::transport::struc::operator<< (std::ostream &os, const Msg_out< Body_t, Struct_builder_t > &val)
 Prints string representation of the given Msg_out to the given ostream. More...
 
template<typename Body_t , typename Reader_config_t >
std::ostream & ipc::transport::struc::operator<< (std::ostream &os, const Msg_in< Body_t, Reader_config_t > &val)
 Prints string representation of the given Msg_in to the given ostream. More...
 
std::ostream & ipc::transport::struc::operator<< (std::ostream &os, const Heap_fixed_builder &val)
 Prints string representation of the given Heap_fixed_builder to the given ostream. More...
 
std::ostream & ipc::transport::struc::operator<< (std::ostream &os, const Heap_reader &val)
 Prints string representation of the given Heap_reader to the given ostream. More...
 
void ipc::transport::struc::stat::heap_serializer_info_dump (Heap_serializer_stats *target_stats)
 Grabs a snapshot of the process-global pure-heap serializer stats – the Heap_serializer_global_stats singleton – into *target_stats which can then be read/printed/aggregated at leisure. More...
 
std::ostream & ipc::transport::struc::stat::operator<< (std::ostream &os, const Serializer_stats &val)
 Prints string representation – flow::util::stat::print() output – of the given Serializer_stats (or variant thereof, e.g. More...
 
template<typename Visitor >
void ipc::transport::struc::stat::declare_stats (const flow::util::stat::Stat_name &name_prefix, const Channel_stats *src_stats, Channel_stats *target_stats, Visitor &&visitor)
 Declares the stats for Channel_stats. More...
 
template<typename Visitor >
void ipc::transport::struc::stat::declare_stats (const flow::util::stat::Stat_name &name_prefix, const Channel_sync_req_stats *src_stats, Channel_sync_req_stats *target_stats, Visitor &&visitor)
 Declares the stats for Channel_sync_req_stats. More...
 
template<typename Visitor >
void ipc::transport::struc::stat::declare_stats (const flow::util::stat::Stat_name &name_prefix, const Serializer_stats *src_stats, Serializer_stats *target_stats, Visitor &&visitor)
 Declares the stats for Serializer_stats. More...
 
template<typename Owned_channel_t , typename Msg_body_t , typename Builder_config_t , typename Reader_config_t >
std::ostream & ipc::transport::struc::sync_io::operator<< (std::ostream &os, const Channel< Owned_channel_t, Msg_body_t, Builder_config_t, Reader_config_t > &val)
 Prints string representation of the given struc::sync_io::Channel to the given ostream. More...
 
template<typename Visitor >
void ipc::transport::struc::sync_io::stat::declare_stats (const flow::util::stat::Stat_name &name_prefix, const Channel_stats *src_stats, Channel_stats *target_stats, Visitor &&visitor)
 Declares the stats for Channel_stats. More...
 
std::ostream & capnp::operator<< (std::ostream &os, const Text::Reader &val)
 Prints string representation of the given capnp::Text::Reader to the given ostream. More...
 

Variables

static constexpr size_t ipc::transport::struc::BUILDER_CONFIG_FRAME_PREFIX_SZ_VIA_STRUC_CHANNEL = 128
 struc::Channel (and struc::sync_io::Channel) requires, for internal purposes, that any Msg_out transmitted over it was provided with a Struct_builder::Config that has m_frame_prefix_sz member set to this value (or larger if desired for some purpose). More...