|
SendTransportEngine * | createSendTransportEngine (Config const &cfgIn, size_t maxMessageSize, size_t minRecvToStart=1u) |
| construct a send transport enngine (and remember it) More...
|
|
SendTransportEngine * | createSendTransportEngineTuply (Config const &cfg, size_t maxMessageSize, tuple< size_t > args) |
| same as above but provide an unified interface - not preferred More...
|
|
template<typename Buffer , typename MsgArbitrator = RecvTransport::NoOpArb> |
auto | createRecvTransportEngine (Config const &cfgIn, Buffer &buffer, MsgArbitrator &&arb=RecvTransport::NoOpArb()) |
| construct a send transport and remember it More...
|
|
template<typename Buffer , typename ArgsTuple > |
auto | createRecvTransportEngineTuply (Config const &cfg, Buffer &buffer, ArgsTuple &&args) |
| same as above but to provide a unified interface - not preferred More...
|
|
Sender * | getSender (Topic const &t) |
| get (or create for the first time) a Sender - whose function is to send messages on its associated Topic More...
|
|
void | listenTo (Topic const &t) |
| This process is interested in a Topic. More...
|
|
void | stopListenTo (Topic const &t) |
| undo the subscription More...
|
|
|
class | hmbdc::pattern::SingletonGuardian< NetContext > |
|
|
static NetContext & | instance () |
|
static bool | initialized () |
|
template<typename Buffer , typename MsgArbitrator = RecvTransport::NoOpArb>
auto hmbdc::app::tcpcast::NetContext::createRecvTransportEngine |
( |
Config const & |
cfgIn, |
|
|
Buffer & |
buffer, |
|
|
MsgArbitrator && |
arb = RecvTransport::NoOpArb() |
|
) |
| |
|
inline |
construct a send transport and remember it
After this, user is respoonsible to get it started within a hmbdc Context, if running in Context pool, it needs to pin at a single pool thread, CANNOT span more than one thread otherwise the transport is not functioing/running. Don't create the same thing twice
- Parameters
-
cfgIn | jason specifing the transport - see example, perf-tcpcast.cpp and DefaultUserConfig.hpp |
buffer | buffer that recv messages go, normally the one returned by app::Context::buffer() |
arb | optonally an arbitrator to decide which messages to keep and drop if arb is an rvalue, it is passed in value, if an lvalue, passed in as reference; it supports ONLY hmbdc message level (AFTER topic filtering) arbitration if int operator()(TransportMessageHeader const* header) presents in the arb passed in. (NO packet level since it is tcp) |
- Returns
- a pointer to the Engine
template<typename Buffer , typename ArgsTuple >
auto hmbdc::app::tcpcast::NetContext::createRecvTransportEngineTuply |
( |
Config const & |
cfg, |
|
|
Buffer & |
buffer, |
|
|
ArgsTuple && |
args |
|
) |
| |
|
inline |
same as above but to provide a unified interface - not preferred
use forward_as_tuple to make the tuple passed in
- Returns
- a pointer to the Engine
SendTransportEngine* hmbdc::app::tcpcast::NetContext::createSendTransportEngine |
( |
Config const & |
cfgIn, |
|
|
size_t |
maxMessageSize, |
|
|
size_t |
minRecvToStart = 1u |
|
) |
| |
|
inline |
construct a send transport enngine (and remember it)
After this, user is responsible to get it started within a hmbdc Context, if running in Context pool, it needs to be pinned on a single pool thread, CANNOT span more than one thread, otherwise the transport is not functioing/running. Don't create the same thing twice.
- Parameters
-
cfgIn | jason specifing the transport - see example, perf-tcpcast.cpp and DefaultUserConfig.hpp |
maxMessageSize | max messafe size in bytes to be sent |
minRecvToStart | start send when there are that many recipients (processes) online, otherwise hold the message in buffer |
- Returns
- a pointer to the Engine
SendTransportEngine* hmbdc::app::tcpcast::NetContext::createSendTransportEngineTuply |
( |
Config const & |
cfg, |
|
|
size_t |
maxMessageSize, |
|
|
tuple< size_t > |
args |
|
) |
| |
|
inline |
same as above but provide an unified interface - not preferred
- Returns
- a pointer to the Engine - don't delete it
Sender* hmbdc::app::tcpcast::NetContext::getSender |
( |
Topic const & |
t | ) |
|
|
inline |
get (or create for the first time) a Sender - whose function is to send messages on its associated Topic
this operation typically might be slow, so caching the return value is recommended.
- Parameters
-
t | - the Topic that the Sender is for |
void hmbdc::app::tcpcast::NetContext::listenTo |
( |
Topic const & |
t | ) |
|
|
inline |
This process is interested in a Topic.
Normally the receiving transport covering this topic needs to be created - not necessarily running - before calling this
- Parameters
-
void hmbdc::app::tcpcast::NetContext::stopListenTo |
( |
Topic const & |
t | ) |
|
|
inline |
undo the subscription
- Parameters
-
The documentation for this struct was generated from the following file: