Documentation ¶
Index ¶
- type EventLoop
- type Poller
- func (p *Poller) AddRead(fd, connID int) error
- func (p *Poller) AddWrite(fd, connID int) error
- func (p *Poller) Close() error
- func (p *Poller) GetConnectMgr() iface.IConnectManager
- func (p *Poller) ModRead(fd, connID int) error
- func (p *Poller) ModWrite(fd, connID int) error
- func (p *Poller) Remove(fd int) error
- func (p *Poller) Wait(emitCh chan<- iface.IContext)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type EventLoop ¶
type EventLoop struct { Num int // 数量 // contains filtered or unexported fields }
func NewEventLoop ¶
func (*EventLoop) Init ¶
func (e *EventLoop) Init(connectMgr iface.IConnectManager) error
Init 初始化poller
type Poller ¶
type Poller struct { Epfd int // eventpoll fd Events []unix.EpollEvent // ConnectMgr iface.IConnectManager // }
func NewPoller ¶
func NewPoller(connectMgr iface.IConnectManager) (*Poller, error)
NewPoller 创建epoll
func (*Poller) GetConnectMgr ¶ added in v0.0.4
func (p *Poller) GetConnectMgr() iface.IConnectManager
GetConnectMgr .
Click to show internal directories.
Click to hide internal directories.