Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var (
ErrUnsupported = errors.New("epoll/kqueue is not supported on this system")
)
Functions ¶
func Supported ¶
func Supported() error
Supported checks if the more efficient network poll library is functional on the current system. It returns ErrUnsupported error if implementation is not supported. Any other error indicates non-functionality. This function does an integration test of the concrete network implementation to ensure that system calls are working as expected.
Types ¶
type Epoll ¶
type Epoll struct {
// contains filtered or unexported fields
}
EPoll is a poll based connection implementation.
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.