Documentation ¶
Index ¶
- Variables
- type Event
- type Poller
- func (ep *Poller) AddRead(fd int) error
- func (ep *Poller) AddWrite(fd int) error
- func (ep *Poller) Close() (err error)
- func (ep *Poller) Del(fd int) error
- func (ep *Poller) EnableRead(fd int) error
- func (ep *Poller) EnableReadWrite(fd int) error
- func (ep *Poller) EnableWrite(fd int) error
- func (ep *Poller) Poll(handler func(fd int, event Event))
- func (ep *Poller) Wake() error
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrClosed = errors.New("poller instance is not running")
ErrClosed 错误: 重复 close poller 错误
Functions ¶
This section is empty.
Types ¶
type Poller ¶
type Poller struct {
// contains filtered or unexported fields
}
Poller:结构体封装
func (*Poller) EnableReadWrite ¶
EnableReadWrite:修改 fd 注册事件为可读可写事件
func (*Poller) EnableWrite ¶
EnableWrite:修改 fd 注册事件为可写事件
Click to show internal directories.
Click to hide internal directories.