package
0.0.0-20230903062148-258f086348c8
Repository: https://github.com/xen0tic/utils.git
Documentation: pkg.go.dev
# Functions
Dup is the wrapper for dupCloseOnExec.
GetPollAttachment attempts to get a cached PollAttachment from pool.
OpenPoller instantiates a poller.
PutPollAttachment put an unused PollAttachment back to pool.
# Constants
ErrEvents represents exceptional events that are not read/write, like socket being closed, reading/writing from/to a closed socket, etc.
InEvents combines EPOLLIN/EPOLLPRI events and some exceptional events.
InitPollEventsCap represents the initial capacity of poller event-list.
MaxAsyncTasksAtOneTime is the maximum amount of asynchronous tasks that the event-loop will process at one time.
MaxPollEventsCap is the maximum limitation of events that the poller can process.
MinPollEventsCap is the minimum limitation of events that the poller can process.
OutEvents combines EPOLLOUT event and some exceptional events.
# Structs
PollAttachment is the user data which is about to be stored in "void *ptr" of epoll_data or "void *udata" of kevent.
Poller represents a poller which is in charge of monitoring file-descriptors.
# Type aliases
IOEvent is the integer type of I/O events on Linux.
PollEventHandler is the callback for I/O events notified by the poller.