poller

package
v0.1.7 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 5, 2022 License: GPL-3.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Epoll

type Epoll struct {
	// contains filtered or unexported fields
}

Epoll implements of Poller for linux

func (*Epoll) Add

func (e *Epoll) Add(fd int) error

func (*Epoll) Close

func (e *Epoll) Close() error

func (*Epoll) Remove

func (e *Epoll) Remove(fd int) error

func (*Epoll) SocketFD

func (e *Epoll) SocketFD(conn net.Conn) int

SocketFD get socket connection fd

func (*Epoll) Wait

func (e *Epoll) Wait() ([]int, error)

type Poller

type Poller interface {
	Add(fd int) error
	Remove(fd int) error
	Wait() ([]int, error)
	SocketFD(conn net.Conn) int
}

func NewPollerWithBuffer

func NewPollerWithBuffer(size int) (Poller, error)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL