Documentation ¶
Index ¶
- Constants
- type IOEvent
- type PollEvent
- type Poller
- func (p *Poller) AddRead(fd int) error
- func (p *Poller) AddWrite(fd int) error
- func (p *Poller) Close() error
- func (p *Poller) Delete(fd int) error
- func (p *Poller) DeleteRead(fd int) error
- func (p *Poller) DeleteReadAndWrite(fd int) error
- func (p *Poller) DeleteWrite(fd int) error
- func (p *Poller) Polling(callback func(fd int, event PollEvent) error) error
Constants ¶
View Source
const ( // InitPollEventsCap represents the initial capacity of poller event-list. InitPollEventsCap = 64 // MaxPollEventsCap is the maximum limitation of events that the poller can process. MaxPollEventsCap = 512 // MinPollEventsCap is the minimum limitation of events that the poller can process. MinPollEventsCap = 16 // MaxAsyncTasksAtOneTime is the maximum amount of asynchronous tasks that the event-loop will process at one time. MaxAsyncTasksAtOneTime = 128 )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Poller ¶
func (*Poller) AddRead ¶
AddRead registers the given file-descriptor with readable event to the poller.
func (*Poller) DeleteRead ¶
DeleteRead deletes the given file-descriptor from the poller.
func (*Poller) DeleteReadAndWrite ¶
func (*Poller) DeleteWrite ¶
DeleteWrite deletes the given file-descriptor from the poller.
Click to show internal directories.
Click to hide internal directories.