#include <EventReceiver.h>
|
static void | atNextTick (const std::function< void(void)> &callBack) |
|
Definition at line 39 of file EventReceiver.h.
◆ EventReceiver() [1/3]
core::EventReceiver::EventReceiver |
( |
const std::string & | name | ) |
|
◆ EventReceiver() [2/3]
◆ EventReceiver() [3/3]
◆ ~EventReceiver()
virtual core::EventReceiver::~EventReceiver |
( |
| ) |
|
|
protectedvirtualdefault |
◆ atNextTick()
void core::EventReceiver::atNextTick |
( |
const std::function< void(void)> & | callBack | ) |
|
|
static |
Definition at line 28 of file EventReceiver.cpp.
28 {
30 public:
31 explicit NextTickEvent(const std::function<void(void)>& callBack)
32 :
core::EventReceiver(
"RequestEvent")
33 , callBack(callBack) {
34 }
35
36 void onEvent([[maybe_unused]]
const utils::Timeval& currentTime)
override {
37 callBack();
38
39 delete this;
40 }
41
42 private:
43 std::function<void(void)> callBack;
44 };
45
46 (
new NextTickEvent(callBack))->
span();
47 }
References span().
◆ destruct()
void core::EventReceiver::destruct |
( |
| ) |
|
|
virtual |
Reimplemented in core::socket::stream::SocketAcceptor< PhysicalSocketServerT, ConfigT, SocketConnectionT >, core::socket::stream::SocketAcceptor< PhysicalServerSocketT, ConfigT, core::socket::stream::legacy::SocketConnection >, core::socket::stream::SocketAcceptor< PhysicalSocketServerT, ConfigT, core::socket::stream::tls::SocketConnection >, core::socket::stream::SocketConnector< PhysicalSocketClientT, ConfigT, SocketConnectionT >, core::socket::stream::SocketConnector< PhysicalClientSocketT, ConfigT, core::socket::stream::legacy::SocketConnection >, core::socket::stream::SocketConnector< PhysicalSocketClientT, ConfigT, core::socket::stream::tls::SocketConnection >, and database::mariadb::MariaDBCommandStartEvent.
Definition at line 53 of file EventReceiver.cpp.
53 {
54 delete this;
55 }
◆ getName()
const std::string & core::EventReceiver::getName |
( |
| ) |
const |
◆ onEvent()
virtual void core::EventReceiver::onEvent |
( |
const utils::Timeval & | currentTime | ) |
|
|
pure virtual |
◆ operator=() [1/2]
◆ operator=() [2/2]
◆ relax()
void core::EventReceiver::relax |
( |
| ) |
|
◆ span()
void core::EventReceiver::span |
( |
| ) |
|
◆ event
Event core::EventReceiver::event |
|
private |
The documentation for this class was generated from the following files: