Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Epoll ¶
type Epoll struct {
// contains filtered or unexported fields
}
Epoll is an epoll based poller.
func (*Epoll) Close ¶
Close closes the poller. If closeConns is true, it will close all the connections.
type Poller ¶
type Poller interface {
// Add adds the connection to poller.
Add(conn net.Conn) error
// Remove removes the connection from poller and closes it.
Remove(conn net.Conn) error
// Wait waits for at most count events and returns the connections.
Wait(count int) ([]net.Conn, error)
// Close closes the poller. If closeConns is true, it will close all the connections.
Close(closeConns bool) error
}
Poller is the interface for epoll/kqueue poller, special for network connections.
Click to show internal directories.
Click to hide internal directories.