◆ 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 |
◆ 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
◆ getSendEngine()
template<typename NetContext , MessageC ... SendMessages, MessageC ... RecvMessages>
get a send engineng
- Returns
- sender engine pointer. The sender engine is owned by the lib - do not delete
◆ 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 pointer. 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 , typename MesssageRecverInterestsTuple = std::tuple<RecvMessages...>>
size_t hmbdc::app::utils::NetPortal< NetContext, std::tuple< SendMessages... >, std::tuple< RecvMessages... > >::pullIn |
( |
MesssageRecver && |
recver | ) |
|
|
inline |
get the incoming messages and dispatch them to the receiving code
it does NOT block - it is not garanteed the user will have received messages if there is nothing received. It is expected to be called whenever the user code feels like receiving messages. This is NOT a thread safe or reentrant function.
- Template Parameters
-
MesssageRecver | a type that has the handleMessageCb() callbacks - see app::Client's doc for those callbacks |
MesssageRecverInterestsTuple | tuple containing the message types of the receiver can handle; If a messages that the receiver is not interested is received, it is simply dropped. |
- Parameters
-
recver | an instance of the receiver |
- Returns
- the message count that has been dispatched to the recver in this call
◆ recvSessionsRemainingActive()
template<typename NetContext , MessageC ... SendMessages, MessageC ... RecvMessages>
size_t hmbdc::app::utils::NetPortal< NetContext, std::tuple< SendMessages... >, std::tuple< RecvMessages... > >::recvSessionsRemainingActive |
( |
| ) |
const |
|
inline |
the recving session that are active which is how many sending parties are active
only supported for reliable transport types such as tcpcast, rmast, and rnemap
- Returns
- the count
◆ 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: