SpiecsEngine
 
Loading...
Searching...
No Matches
Spices::Net::EPollPoller Class Reference

EPoll Poller. More...

#include <EPollPoller.h>

Inheritance diagram for Spices::Net::EPollPoller:
Spices::Net::Poller

Public Types

using EventList = std::vector<epoll_event>
 
using ChannelList = std::vector<Channel*>
 
using ChannelMap = std::unordered_map<SOCKET, Channel*>
 

Public Member Functions

 EPollPoller (EventLoop *loop)
 Constructor Function.
 
virtual ~EPollPoller () override
 Destructor Function.
 
 EPollPoller (const EPollPoller &)=delete
 Copy Constructor Function.
 
EPollPolleroperator= (const EPollPoller &)=delete
 Copy Assignment Operation.
 
HANDLE GetHandle () const
 Get this EPollPoller Handle.
 
virtual void Poll (int timeoutMs, ChannelList *activeChannels) override
 Poll events on EventList.
 
virtual void UpdateChannel (Channel *channel) override
 Update Channel and Update Poll.
 
virtual void RemoveChannel (Channel *channel) override
 Remove Channel and Update Poll.
 
bool HasChannel (Channel *channel) const
 Determine if channel is in ChannelMap.
 

Static Public Member Functions

static std::shared_ptr< PollerDefaultPoller (EventLoop *loop)
 Create Default Poller.
 

Protected Attributes

ChannelMap m_Channels
 This Poller interested Channels.
 

Private Member Functions

void FillActiveChannels (int numEvents, ChannelList *activeChannels) const
 Fill REvents to ChannelList.
 
void Update (int operation, Channel *channel) const
 Update epoll with operation.
 

Private Attributes

HANDLE m_EPollFd
 EPoll fd.
 
EventList m_Events
 EventList.
 
EventLoopm_Loop
 This Poller interested EventLoop.
 

Detailed Description

EPoll Poller.

Definition at line 19 of file EPollPoller.h.


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