hmbdc
simplify-high-performance-messaging-programming
Public Member Functions | List of all members
hmbdc::app::udpcast::sendtransportengine_detail::SendTransportEngine Struct Reference
Inheritance diagram for hmbdc::app::udpcast::sendtransportengine_detail::SendTransportEngine:
hmbdc::app::udpcast::sendtransportengine_detail::SendTransport hmbdc::app::Client< SendTransportEngine > hmbdc::app::udpcast::Transport hmbdc::app::udpcast::EpollFd hmbdc::app::utils::EpollFd

Public Member Functions

void rotate ()
 if the user choose no to have a Context to manage and run the engine this method can be called from any thread from time to time to have the engine do its job More...
 
void messageDispatchingStartedCb (uint16_t threadSerialNumber) override
 called before any messages got dispatched - only once More...
 
void invokedCb (uint16_t) HMBDC_RESTRICT override
 this callback is called all the time (frequently) - the exact timing is after a batch of messages are dispatched. After this call returns, the previously dispatched message's addresses are no longer valid, which means if you cache the event addresses in the previous handleMessageCb()s, you cannot use those after the return of the next invokeCb function. More...
 
bool droppedCb () override
 callback called after the Client is safely taken out of the Context More...
 
- Public Member Functions inherited from hmbdc::app::Client< SendTransportEngine >
char const * hmbdcName () const
 return the name of thread that runs this client, override if necessary More...
 
std::tuple< char const *, int > schedSpec () const
 an overrideable method. returns the schedule policy and priority, override if necessary priority is only used when policy is "SCHED_RR", or "SCHED_FIFO" More...
 
size_t maxBatchMessageCount () const
 an overridable method. client receives events in batches and the max batch size is controllable when running in direct mode Context. Here is to specify the max size. More...
 
virtual void stoppedCb (std::exception const &e)
 callback called when this Client is taken out of message dispatching More...
 
virtual ~Client ()
 trivial
 
void stopped (std::exception const &e) noexcept
 the following are for internal use, don't change or override
 

Additional Inherited Members

- Protected Member Functions inherited from hmbdc::app::Client< SendTransportEngine >
void batchDone ()
 the derived user's Client has the option to stop the current batch of event dispatching. More...
 

Member Function Documentation

◆ droppedCb()

bool hmbdc::app::udpcast::sendtransportengine_detail::SendTransportEngine::droppedCb ( )
inlineoverridevirtual

callback called after the Client is safely taken out of the Context

exception thrown here is ignored and return true is assumed

Returns
if false, this Client is added back to the Context to process messages otherwise, no more callback. You could even safely "delete this; return true;"

Reimplemented from hmbdc::app::Client< SendTransportEngine >.

◆ invokedCb()

void hmbdc::app::udpcast::sendtransportengine_detail::SendTransportEngine::invokedCb ( uint16_t  threadSerialNumber)
inlineoverridevirtual

this callback is called all the time (frequently) - the exact timing is after a batch of messages are dispatched. After this call returns, the previously dispatched message's addresses are no longer valid, which means if you cache the event addresses in the previous handleMessageCb()s, you cannot use those after the return of the next invokeCb function.

you can collectively process the messages received/cached so far here, or do something needs to be done all the time like powering another message loop

Parameters
threadSerialNumberthe number indicating which thread is in action

Reimplemented from hmbdc::app::Client< SendTransportEngine >.

◆ messageDispatchingStartedCb()

void hmbdc::app::udpcast::sendtransportengine_detail::SendTransportEngine::messageDispatchingStartedCb ( uint16_t  threadSerialNumber)
inlineoverridevirtual

called before any messages got dispatched - only once

this is the place some preparation code goes to

Parameters
threadSerialNumbernormally the number indicating which thread is in action, except when INTERESTS_SIZE == 0 it is another undefined value

Reimplemented from hmbdc::app::Client< SendTransportEngine >.

◆ rotate()

void hmbdc::app::udpcast::sendtransportengine_detail::SendTransportEngine::rotate ( )
inline

if the user choose no to have a Context to manage and run the engine this method can be called from any thread from time to time to have the engine do its job

thread safe and non-blocking, if the engine is already being powered by a Context, this method has no effect


The documentation for this struct was generated from the following file: