Documentation ¶
Index ¶
- type EventLoop
- func (l *EventLoop) AddSocketAndEnableRead(fd int, s Socket) error
- func (l *EventLoop) DeleteFdInLoop(fd int)
- func (l *EventLoop) EnableRead(fd int) error
- func (l *EventLoop) EnableReadWrite(fd int) error
- func (l *EventLoop) PacketBuf() []byte
- func (l *EventLoop) QueueInLoop(f func())
- func (l *EventLoop) RunLoop()
- func (l *EventLoop) Stop() error
- type Socket
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type EventLoop ¶
type EventLoop struct {
// contains filtered or unexported fields
}
EventLoop:事件循环
func (*EventLoop) AddSocketAndEnableRead ¶
AddSocketAndEnableRead:增加 Socket 到事件循环中,并注册可读事件
func (*EventLoop) EnableReadWrite ¶
EnableReadWrite:使能可读可写事件
func (*EventLoop) QueueInLoop ¶
func (l *EventLoop) QueueInLoop(f func())
QueueInLoop:添加 func 到事件循环中执行
Click to show internal directories.
Click to hide internal directories.