◆ NetPortal()
template<typename NetContext , MessageC ... SendMessages, MessageC ... RecvMessages>
ctor - only can be called after the NetContext singleton is created
it does not go thru the state machine for sender / receiver hand shake if the netowork transport dictates that calling rotate several times will make it happen
- Parameters
-
cfg | a json configure that has a tx and / or rx sections the supported params are the same as individual transport |
messageQueueSizePower2Num | - see doc in NetContext |
◆ flushOut()
template<typename NetContext , MessageC ... SendMessages, MessageC ... RecvMessages>
just run the portal part that send messages
it does NOT block - it is not garanteed the user will have sent messages depending on underly network transport. It is expected to be called multiple times thread safe
in low traffic cases the messages are always sent out by single call
◆ getSender()
template<typename NetContext , MessageC ... SendMessages, MessageC ... RecvMessages>
get a sender for a topic
thread safe but a slow call
- so the user cashing the result is expected
- Parameters
-
- Returns
- sender point. The sender is owned by the lib - do not delete
◆ listenTo()
template<typename NetContext , MessageC ... SendMessages, MessageC ... RecvMessages>
listen to a topic - has impact on the pullIn call
threadsafe
- Parameters
-
◆ pullIn()
template<typename NetContext , MessageC ... SendMessages, MessageC ... RecvMessages>
template<typename MesssageRecver >
size_t hmbdc::app::utils::NetPortal< NetContext, std::tuple< SendMessages... >, std::tuple< RecvMessages... > >::pullIn |
( |
MesssageRecver && |
recver | ) |
|
|
inline |
just run the portal part that receives messages
it does NOT block - it is not garanteed the user will have received messages. It is expected to be called multiple times thread safe
- Template Parameters
-
MesssageRecver | a type that has the handleMessageCb() callbacks - see app::Client's doc for those callbacks |
- Parameters
-
recver | an instance of the receiver |
- Returns
- the message count that has been dispatched to the recver in this call
◆ rotate()
template<typename NetContext , MessageC ... SendMessages, MessageC ... RecvMessages>
run the portal to send and receive messages
it does NOT block - it is not garanteed the user will have sent or received messages. It is expected to be called multiple times thread safe
◆ sendSessionsRemainingActive()
template<typename NetContext , MessageC ... SendMessages, MessageC ... RecvMessages>
size_t hmbdc::app::utils::NetPortal< NetContext, std::tuple< SendMessages... >, std::tuple< RecvMessages... > >::sendSessionsRemainingActive |
( |
| ) |
const |
|
inline |
the sending session that are active which is how many receiver are active
only supported for reliable transport types such as tcpcast, rmast, and rnemap
- Returns
- the count - return numeric_limits<size_t>::max() when the first receiver is yet to connect (initial)
◆ stopListenTo()
template<typename NetContext , MessageC ... SendMessages, MessageC ... RecvMessages>
stop listening to a topic - has impact on the pullIn call
threadsafe
- Parameters
-
The documentation for this struct was generated from the following file: