SNode.C
Loading...
Searching...
No Matches
core::eventreceiver::ReadEventReceiver Class Referenceabstract

#include <ReadEventReceiver.h>

Inheritance diagram for core::eventreceiver::ReadEventReceiver:
Collaboration diagram for core::eventreceiver::ReadEventReceiver:

Protected Member Functions

 ReadEventReceiver (const std::string &name, const utils::Timeval &timeout)
 
virtual void readTimeout ()
 
- Protected Member Functions inherited from core::DescriptorEventReceiver
bool enable (int fd)
 
void disable ()
 
void suspend ()
 
void resume ()
 
- Protected Member Functions inherited from core::Observer
void observed ()
 
void unObserved ()
 
virtual void unobservedEvent ()=0
 
 Observer ()=default
 
 Observer (Observer &)=delete
 
 Observer (Observer &&)=delete
 
virtual ~Observer ()
 
- Protected Member Functions inherited from core::EventReceiver
virtual ~EventReceiver ()=default
 
 EventReceiver (const std::string &name)
 
 EventReceiver (EventReceiver &)=delete
 
 EventReceiver (EventReceiver &&)=delete
 
EventReceiveroperator= (EventReceiver &)=delete
 
EventReceiveroperator= (EventReceiver &&)=delete
 
virtual void destruct ()
 
void span ()
 
void relax ()
 
const std::string & getName () const
 

Private Member Functions

virtual void readEvent ()=0
 
void dispatchEvent () final
 
void timeoutEvent () final
 
void signalEvent (int signum) override
 

Additional Inherited Members

- Public Member Functions inherited from core::DescriptorEventReceiver
 DescriptorEventReceiver (const std::string &name, DescriptorEventPublisher &descriptorEventPublisher, const utils::Timeval &timeout=TIMEOUT::DISABLE)
 
int getRegisteredFd () const
 
bool isEnabled () const
 
bool isSuspended () const
 
void setTimeout (const utils::Timeval &timeout)
 
utils::Timeval getTimeout (const utils::Timeval &currentTime) const
 
void checkTimeout (const utils::Timeval &currentTime)
 
- Public Member Functions inherited from core::EventReceiver
 EventReceiver (const std::string &name)
 
 EventReceiver (EventReceiver &)=delete
 
 EventReceiver (EventReceiver &&)=delete
 
EventReceiveroperator= (EventReceiver &)=delete
 
EventReceiveroperator= (EventReceiver &&)=delete
 
virtual void destruct ()
 
void span ()
 
void relax ()
 
const std::string & getName () const
 
- Static Public Member Functions inherited from core::EventReceiver
static void atNextTick (const std::function< void(void)> &callBack)
 
- Static Protected Member Functions inherited from core::EventReceiver
static void atNextTick (const std::function< void(void)> &callBack)
 

Detailed Description

Definition at line 57 of file ReadEventReceiver.h.

Constructor & Destructor Documentation

◆ ReadEventReceiver()

core::eventreceiver::ReadEventReceiver::ReadEventReceiver ( const std::string &  name,
const utils::Timeval timeout 
)
protected

Definition at line 53 of file ReadEventReceiver.cpp.

55 name + " Read",
56 core::EventLoop::instance().getEventMultiplexer().getDescriptorEventPublisher(core::EventMultiplexer::DISP_TYPE::RD),
57 timeout) {
58 }
static EventLoop & instance()
Definition EventLoop.cpp:79

References core::DescriptorEventReceiver::DescriptorEventReceiver(), core::EventMultiplexer::getDescriptorEventPublisher(), core::EventLoop::getEventMultiplexer(), core::EventLoop::instance(), and core::EventMultiplexer::RD.

Referenced by apps::towercalculator::KeyboardReader::KeyboardReader(), core::pipe::PipeSink::PipeSink(), core::socket::stream::SocketReader::SocketReader(), core::socket::stream::tls::TLSHandshake::TLSHandshake(), and core::socket::stream::tls::TLSShutdown::TLSShutdown().

Here is the call graph for this function:
Here is the caller graph for this function:

Member Function Documentation

◆ dispatchEvent()

void core::eventreceiver::ReadEventReceiver::dispatchEvent ( )
finalprivatevirtual

Implements core::DescriptorEventReceiver.

Definition at line 64 of file ReadEventReceiver.cpp.

64 {
65 readEvent();
66 }

References readEvent().

Here is the call graph for this function:

◆ readEvent()

virtual void core::eventreceiver::ReadEventReceiver::readEvent ( )
privatepure virtual

Implemented in core::socket::stream::SocketReader, core::socket::stream::tls::TLSHandshake, core::socket::stream::tls::TLSShutdown, apps::towercalculator::KeyboardReader, core::pipe::PipeSink, and database::mariadb::MariaDBConnection.

Referenced by dispatchEvent().

Here is the caller graph for this function:

◆ readTimeout()

void core::eventreceiver::ReadEventReceiver::readTimeout ( )
protectedvirtual

Reimplemented in core::socket::stream::tls::TLSHandshake, core::socket::stream::tls::TLSShutdown, and database::mariadb::MariaDBConnection.

Definition at line 60 of file ReadEventReceiver.cpp.

References core::DescriptorEventReceiver::disable().

Referenced by timeoutEvent().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ signalEvent()

void core::eventreceiver::ReadEventReceiver::signalEvent ( int  signum)
overrideprivatevirtual

Implements core::DescriptorEventReceiver.

Reimplemented in core::socket::stream::SocketReader, core::socket::stream::tls::TLSHandshake, and core::socket::stream::tls::TLSShutdown.

Definition at line 72 of file ReadEventReceiver.cpp.

72 {
73 disable();
74 }

References core::DescriptorEventReceiver::disable().

Here is the call graph for this function:

◆ timeoutEvent()

void core::eventreceiver::ReadEventReceiver::timeoutEvent ( )
finalprivatevirtual

Implements core::DescriptorEventReceiver.

Definition at line 68 of file ReadEventReceiver.cpp.

References readTimeout().

Here is the call graph for this function:

The documentation for this class was generated from the following files: