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

epoll event loop More...

#include <EpollEventLoop.h>

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

Public Member Functions

bool init () override
 
 ~EpollEventLoop () override
 
void dispatch (uint32_t timeout) override
 
void onAccept (int fd) override
 
void onRead (BaseEvent *event) override
 
void onWrite (BaseEvent *event) override
 
void onError (BaseEvent *event) override
 
void onClose (BaseEvent *event) override
 
BaseEventcreateEvent (int fd, unsigned int events, void *data) override
 
void freeEvent (BaseEvent *event) override
 
bool setEvent (BaseEvent *event) override
 
void setListenFd (int fd) override
 
- Public Member Functions inherited from sese::event::BaseEventLoop
virtual ~BaseEventLoop ()=default
 

Protected Attributes

int listenFd {-1}
 
BaseEventlistenEvent {nullptr}
 
int epoll {-1}
 
EpollEventConvert convert
 
- Protected Attributes inherited from sese::event::BaseEventLoop
bool handleClose = true
 Indicates whether the current loop is handling a close event.
 

Detailed Description

epoll event loop

Constructor & Destructor Documentation

◆ ~EpollEventLoop()

sese::event::EpollEventLoop::~EpollEventLoop ( )
override

References close().

Member Function Documentation

◆ createEvent()

sese::event::BaseEvent * sese::event::EpollEventLoop::createEvent ( int fd,
unsigned int events,
void * data )
overridevirtual

Implements sese::event::BaseEventLoop.

References sese::event::BaseEvent::fd.

Referenced by init().

◆ dispatch()

void sese::event::EpollEventLoop::dispatch ( uint32_t timeout)
overridevirtual

◆ freeEvent()

void sese::event::EpollEventLoop::freeEvent ( BaseEvent * event)
overridevirtual

◆ init()

bool sese::event::EpollEventLoop::init ( )
overridevirtual

◆ onAccept()

void sese::event::EpollEventLoop::onAccept ( int fd)
overridevirtual

◆ onClose()

void sese::event::EpollEventLoop::onClose ( BaseEvent * event)
overridevirtual

◆ onError()

void sese::event::EpollEventLoop::onError ( BaseEvent * event)
overridevirtual

◆ onRead()

void sese::event::EpollEventLoop::onRead ( BaseEvent * event)
overridevirtual

◆ onWrite()

void sese::event::EpollEventLoop::onWrite ( BaseEvent * event)
overridevirtual

◆ setEvent()

bool sese::event::EpollEventLoop::setEvent ( BaseEvent * event)
overridevirtual

◆ setListenFd()

void sese::event::EpollEventLoop::setListenFd ( int fd)
inlineoverridevirtual

Implements sese::event::BaseEventLoop.

References listenFd.

Member Data Documentation

◆ convert

EpollEventConvert sese::event::EpollEventLoop::convert
protected

◆ epoll

int sese::event::EpollEventLoop::epoll {-1}
protected

Referenced by init().

◆ listenEvent

BaseEvent* sese::event::EpollEventLoop::listenEvent {nullptr}
protected

Referenced by init().

◆ listenFd

int sese::event::EpollEventLoop::listenFd {-1}
protected

Referenced by init(), and setListenFd().


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