Sese Framework  2.3.0
A cross-platform framework
Loading...
Searching...
No Matches
sese::event::BaseEventLoop Class Referenceabstract

Basic network event loop interface. More...

#include <BaseEventLoop.h>

Inheritance diagram for sese::event::BaseEventLoop:
sese::event::EpollEventLoop sese::event::KqueueEventLoop sese::event::WSAEventLoop

Public Member Functions

virtual bool init ()=0
 
virtual ~BaseEventLoop ()=default
 
virtual void dispatch (uint32_t timeout)=0
 
virtual void onAccept (int fd)=0
 
virtual void onRead (BaseEvent *event)=0
 
virtual void onWrite (BaseEvent *event)=0
 
virtual void onError (BaseEvent *event)=0
 
virtual void onClose (BaseEvent *event)=0
 
virtual BaseEventcreateEvent (int fd, unsigned int events, void *data)=0
 
virtual void freeEvent (BaseEvent *event)=0
 
virtual bool setEvent (BaseEvent *event)=0
 
virtual void setListenFd (int fd)=0
 

Protected Attributes

bool handleClose = true
 Indicates whether the current loop is handling a close event.
 

Detailed Description

Basic network event loop interface.

Constructor & Destructor Documentation

◆ ~BaseEventLoop()

virtual sese::event::BaseEventLoop::~BaseEventLoop ( )
virtualdefault

Member Function Documentation

◆ createEvent()

virtual BaseEvent * sese::event::BaseEventLoop::createEvent ( int fd,
unsigned int events,
void * data )
pure virtual

◆ dispatch()

virtual void sese::event::BaseEventLoop::dispatch ( uint32_t timeout)
pure virtual

◆ freeEvent()

virtual void sese::event::BaseEventLoop::freeEvent ( BaseEvent * event)
pure virtual

◆ init()

virtual bool sese::event::BaseEventLoop::init ( )
pure virtual

◆ onAccept()

virtual void sese::event::BaseEventLoop::onAccept ( int fd)
pure virtual

◆ onClose()

virtual void sese::event::BaseEventLoop::onClose ( BaseEvent * event)
pure virtual

◆ onError()

virtual void sese::event::BaseEventLoop::onError ( BaseEvent * event)
pure virtual

◆ onRead()

virtual void sese::event::BaseEventLoop::onRead ( BaseEvent * event)
pure virtual

◆ onWrite()

virtual void sese::event::BaseEventLoop::onWrite ( BaseEvent * event)
pure virtual

◆ setEvent()

virtual bool sese::event::BaseEventLoop::setEvent ( BaseEvent * event)
pure virtual

◆ setListenFd()

virtual void sese::event::BaseEventLoop::setListenFd ( int fd)
pure virtual

Member Data Documentation

◆ handleClose

bool sese::event::BaseEventLoop::handleClose = true
protected

Indicates whether the current loop is handling a close event.


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