poll

package
v0.0.0-...-e165b3a Latest Latest
Warning

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

Go to latest
Published: Apr 3, 2021 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

对端关闭连接 8193

Variables

This section is empty.

Functions

This section is empty.

Types

type Poll

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

func NewPoll

func NewPoll(port int) (*Poll, error)

创建Poll

func (*Poll) Accept

func (p *Poll) Accept() (int, syscall.Sockaddr, error)

func (*Poll) AddRead

func (p *Poll) AddRead(fd int) error

func (*Poll) RemoveAndClose

func (p *Poll) RemoveAndClose(fd int) error

func (*Poll) Wait

func (p *Poll) Wait(eventGateway func(event common.Event)) error

type PollInterface

type PollInterface interface {
	RemoveAndClose(fd int) error
	Wait(handler func(event common.Event)) error
	AddRead(fd int) error
}

Jump to

Keyboard shortcuts

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