join 1.0
lightweight network framework library
Loading...
Searching...
No Matches
join::EventHandler Class Reference

Event handler interface class. More...

#include <reactor.hpp>

Inheritance diagram for join::EventHandler:

Public Member Functions

 EventHandler ()=default
 create instance.
 
 EventHandler (const EventHandler &other)=default
 copy constructor.
 
EventHandleroperator= (const EventHandler &other)=default
 copy assignment operator.
 
 EventHandler (EventHandler &&other)=default
 move constructor.
 
EventHandleroperator= (EventHandler &&other)=default
 move assignment operator.
 
virtual ~EventHandler ()=default
 destroy instance.
 

Protected Member Functions

virtual void onReceive (int fd)
 method called when data are ready to be read on handle.
 
virtual void onClose (int fd)
 method called when handle is closed.
 
virtual void onError (int fd)
 method called when an error occurred on handle.
 

Friends

class Reactor
 friendship with reactor.
 

Detailed Description

Event handler interface class.

Constructor & Destructor Documentation

◆ EventHandler() [1/3]

join::EventHandler::EventHandler ( )
default

create instance.

◆ EventHandler() [2/3]

join::EventHandler::EventHandler ( const EventHandler & other)
default

copy constructor.

Parameters
otherother object to copy.

◆ EventHandler() [3/3]

join::EventHandler::EventHandler ( EventHandler && other)
default

move constructor.

Parameters
otherother object to move.

◆ ~EventHandler()

virtual join::EventHandler::~EventHandler ( )
virtualdefault

destroy instance.

Member Function Documentation

◆ onClose()

virtual void join::EventHandler::onClose ( int fd)
inlineprotectedvirtual

method called when handle is closed.

Parameters
fdfile descriptor.

Reimplemented in ReactorTest.

◆ onError()

virtual void join::EventHandler::onError ( int fd)
inlineprotectedvirtual

method called when an error occurred on handle.

Parameters
fdfile descriptor.

Reimplemented in ReactorTest.

◆ onReceive()

virtual void join::EventHandler::onReceive ( int fd)
inlineprotectedvirtual

method called when data are ready to be read on handle.

Parameters
fdfile descriptor.

Reimplemented in join::BasicTimer< ClockPolicy >, join::NetlinkManager, and ReactorTest.

◆ operator=() [1/2]

EventHandler & join::EventHandler::operator= ( const EventHandler & other)
default

copy assignment operator.

Parameters
otherother object to copy.
Returns
current object.

◆ operator=() [2/2]

EventHandler & join::EventHandler::operator= ( EventHandler && other)
default

move assignment operator.

Parameters
otherother object to move.
Returns
current object.

Friends And Related Symbol Documentation

◆ Reactor

friend class Reactor
friend

friendship with reactor.


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