hmbdc
simplify-high-performance-messaging-programming
Public Member Functions | List of all members
hmbdc::tips::rmcast::recvtransportengine_detail::RecvTransportEngine< OutputBuffer, AttachmentAllocator > Struct Template Reference
Inheritance diagram for hmbdc::tips::rmcast::recvtransportengine_detail::RecvTransportEngine< OutputBuffer, AttachmentAllocator >:
hmbdc::tips::rmcast::recvtransportengine_detail::RecvTransportImpl< OutputBuffer, AttachmentAllocator > hmbdc::app::Client< RecvTransportEngine< OutputBuffer, AttachmentAllocator > > hmbdc::tips::rmcast::RecvTransport hmbdc::time::TimerManager hmbdc::tips::rmcast::transport_detail::EngineTransport hmbdc::tips::rmcast::transport_detail::Transport

Public Member Functions

void messageDispatchingStartedCb (size_t const *) override
 called before any messages got dispatched - only once More...
 
void invokedCb (size_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...
 
void stoppedCb (std::exception const &e) override
 should not happen ever unless an exception thrown More...
 
- Public Member Functions inherited from hmbdc::tips::rmcast::recvtransportengine_detail::RecvTransportImpl< OutputBuffer, AttachmentAllocator >
 RecvTransportImpl (Config const &cfg, OutputBuffer &outputBuffer)
 ctor More...
 
void start ()
 start the show by schedule the mesage recv
 
void handleMessageCb (TypeTagBackupSource const &t)
 only used by MH
 
size_t sessionsRemainingActive () const
 check how many other parties are sending to this engine More...
 
- Public Member Functions inherited from hmbdc::time::TimerManager
void schedule (SysTime fireAt, Timer &timer)
 schedule the timer to start at a specific time More...
 
void cancel (Timer &timer)
 cancel a timer previously scheduled with the TimerManager More...
 
- Public Member Functions inherited from hmbdc::app::Client< RecvTransportEngine< OutputBuffer, AttachmentAllocator > >
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 bool droppedCb ()
 callback called after the Client is safely taken out of the Context 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< RecvTransportEngine< OutputBuffer, AttachmentAllocator > >
void batchDone ()
 the derived user's Client has the option to stop the current batch of event dispatching. More...
 

Member Function Documentation

◆ invokedCb()

template<typename OutputBuffer , typename AttachmentAllocator >
void hmbdc::tips::rmcast::recvtransportengine_detail::RecvTransportEngine< OutputBuffer, AttachmentAllocator >::invokedCb ( size_t  dispatched)
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
dispatchedthe number of messages dispatched since last invokedCb called

Reimplemented from hmbdc::app::Client< RecvTransportEngine< OutputBuffer, AttachmentAllocator > >.

◆ messageDispatchingStartedCb()

template<typename OutputBuffer , typename AttachmentAllocator >
void hmbdc::tips::rmcast::recvtransportengine_detail::RecvTransportEngine< OutputBuffer, AttachmentAllocator >::messageDispatchingStartedCb ( size_t const *  pClientDispatchingStarted)
inlineoverridevirtual

called before any messages got dispatched - only once

this is the place some preparation code goes to

Parameters
pClientDispatchingStartedpointer to the Client count that has started displatching within its Context; its value could change if you repeatedly check - might be used to sync with other Clients within the same Context (particularly IPC Context) at starting up stage of the system. When doing the sync, just be aware the Client might be running in a pool - do not hog the pool thread if possible. Note: Since ipc_creator Context has an implicitly purger Client, this value would be 1 greater than the user Clients count

Reimplemented from hmbdc::app::Client< RecvTransportEngine< OutputBuffer, AttachmentAllocator > >.

◆ stoppedCb()

template<typename OutputBuffer , typename AttachmentAllocator >
void hmbdc::tips::rmcast::recvtransportengine_detail::RecvTransportEngine< OutputBuffer, AttachmentAllocator >::stoppedCb ( std::exception const &  e)
inlineoverridevirtual

should not happen ever unless an exception thrown

Parameters
eexception thown

Reimplemented from hmbdc::app::Client< RecvTransportEngine< OutputBuffer, AttachmentAllocator > >.


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