Inherit from this and Implement Specific Poller. More...
#include <Poller.h>
Public Types | |
| using | ChannelList = std::vector<Channel*> |
| using | ChannelMap = std::unordered_map<SOCKET, Channel*> |
Public Member Functions | |
| Poller (EventLoop *loop) | |
| Constructor Function. | |
| virtual | ~Poller ()=default |
| Destructor Function. | |
| Poller (const Poller &)=delete | |
| Copy Constructor Function. | |
| Poller & | operator= (const Poller &)=delete |
| Copy Assignment Operation. | |
| virtual void | Poll (int timeoutMs, ChannelList *activeChannels)=0 |
| Poll events on EventList. | |
| virtual void | UpdateChannel (Channel *channel)=0 |
| Update Channel and Update Poll. | |
| virtual void | RemoveChannel (Channel *channel)=0 |
| Remove Channel and Update Poll. | |
| bool | HasChannel (Channel *channel) const |
| Determine if channel is in ChannelMap. | |
Static Public Member Functions | |
| static std::shared_ptr< Poller > | DefaultPoller (EventLoop *loop) |
| Create Default Poller. | |
Protected Attributes | |
| ChannelMap | m_Channels |
| This Poller interested Channels. | |
Private Attributes | |
| EventLoop * | m_Loop |
| This Poller interested EventLoop. | |