1 Star 0 Fork 0

邢成功/mymuduo

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
epollpoller.h 692 Bytes
一键复制 编辑 原始数据 按行查看 历史
#pragma once
#include"poller.h"
#include<vector>
class EpollPoller : public Poller
{
public:
EpollPoller(EventLoop *loop);
~EpollPoller() override;
public:
Timestamp poll(int timeoutMs, ChannelList *activeChannels) override;
public:
void updateChannel(Channel *channel) override;
void removeChannel(Channel *channel) override;
private:
void fillActiveChannels(int numEvents, ChannelList *activeChannels) const;
private:
void update(int operation, Channel * channel);
private:
int m_epollfd;
using EventList = std::vector<struct epoll_event>;
/* vector<epoll_event> */
EventList m_events;
/* EventList初始的长度 */
static const int kInitEventListSize = 16;
};
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
C++
1
https://gitee.com/mrcan/mymuduo.git
git@gitee.com:mrcan/mymuduo.git
mrcan
mymuduo
mymuduo
master

搜索帮助