hmbdc
simplify-high-performance-messaging-programming
|
impl class More...
#include <RecvTransportEngine.hpp>
Public Member Functions | |
char const * | hmbdcName () const |
std::tuple< char const *, int > | schedSpec () const |
void | invokedCb (uint16_t) HMBDC_RESTRICT override |
power the io_service and other things | |
void | messageDispatchingStartedCb (uint16_t threadSerialNumber) override |
start the show by schedule the mesage recv | |
void | stoppedCb (std::exception const &e) override |
should not happen ever unless an exception thrown More... | |
![]() | |
RecvTransportImpl (Config const &cfg, OutputBuffer &outputBuffer, MsgArbitrator arb=NoOpArb()) | |
ctor More... | |
void | start () |
start the show by schedule the mesage recv | |
void | runOnce () HMBDC_RESTRICT |
power the io_service and other things | |
void | handleMessageCb (Subscribe const &t) |
only used by MH | |
void | handleMessageCb (Unsubscribe const &t) |
only used by MH | |
void | listenTo (Topic const &t) override |
void | stopListenTo (Topic const &t) override |
boost::asio::ip::udp::socket & | asioSocket () |
expose so user can manipulate it More... | |
void | initInThread () |
![]() | |
Transport (Config const &cfg) | |
void | initInThread () |
bool | operator== (Transport const &other) const |
bool | operator< (Transport const &other) const |
![]() | |
void | handleMessage (MessageHead &w) |
![]() | |
Client () | |
trivial constructor | |
void | messageDispatchingStartedCb (uint16_t threadSerialNumber) override |
called before any messages got dispatched - only once More... | |
void | stoppedCb (std::exception const &e) override |
callback called when this Client is taken out of message dispatching More... | |
bool | droppedCb () override |
callback called after the Client is safely taken out of the Context More... | |
void | invokedCb (uint16_t threadSerialNumber) override |
this callback is called all the time (frequently) More... | |
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... | |
void | handleRangeImpl (BufIt &it, BufIt const &end, uint16_t threadSerialNumber) override |
internal use, don't change or override | |
![]() | |
void | handleMessage (MessageHead &w) |
![]() | |
PoolConsumer (bool interestedInMessages=true) | |
void | stopped (std::exception const &) noexcept |
bool | dropped () noexcept |
void | messageDispatchingStarted (uint16_t threadId) |
void | invoked (uint16_t threadId) |
Additional Inherited Members | |
![]() | |
using | SELF = RecvTransportImpl |
using | MH = MessageHandler< SELF, Subscribe, Unsubscribe > |
![]() | |
using | ptr = std::shared_ptr< RecvTransport > |
![]() | |
using | ptr = std::shared_ptr< Transport > |
![]() | |
enum | |
![]() | |
static void | tryDispatch (RecvTransportImpl< OutputBuffer, MsgArbitrator > *p, MessageHead &w) |
![]() | |
static void | tryDispatch (RecvTransportEngineImpl< OutputBuffer, MsgArbitrator > *p, MessageHead &w) |
![]() | |
using | Buffer = hmbdc::pattern::LockFreeBufferT< 1 > |
![]() | |
using | BufIt = lf_misc::iterator< HMBDC_SEQ_TYPE > |
![]() | |
std::string | hmbdcName_ |
std::string | schedPolicy_ |
int | schedPriority_ |
Config const | config_ |
std::shared_ptr< boost::asio::io_service > | pIos_ |
impl class
this needs to be created using NetContext and start in an app::Context
OutputBuffer | type of buffer to hold resulting network messages |
MsgArbitrator | arbitrator to decide drop or keep messages, sued to arbitrate between difefrent recv transports. By default, keep all |
|
inlineoverridevirtual |
should not happen ever unless an exception thrown
e | exception thown |
Reimplemented from hmbdc::pattern::PoolConsumer.