mirror of
https://github.com/huiwan-code/CProxy.git
synced 2026-02-07 23:16:23 +08:00
21 lines
397 B
C++
21 lines
397 B
C++
#pragma once
|
|
#include <memory>
|
|
#include <mutex>
|
|
|
|
#include "channel.h"
|
|
#include "event_dispatcher.h"
|
|
#include "util.h"
|
|
|
|
class EventLoop {
|
|
public:
|
|
EventLoop();
|
|
void Loop();
|
|
void AddToPoller(SP_Channel channel);
|
|
void UpdateToPoller(SP_Channel channel);
|
|
void RemoveFromPoller(SP_Channel channel);
|
|
|
|
private:
|
|
SP_EventDispatcher poller_;
|
|
};
|
|
|
|
typedef std::shared_ptr<EventLoop> SP_EventLoop; |