lemonwork

package module
v0.0.0-...-12c9f84 Latest Latest
Warning

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

Go to latest
Published: Jul 24, 2022 License: MIT Imports: 3 Imported by: 2

README

lemonwork

High-performance Epoll/Kqueue library for Go

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetFdFromTCPConn

func GetFdFromTCPConn(c *net.TCPConn) int

Types

type EpollPoller

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

func NewEpollPoller

func NewEpollPoller(PollSize int) (ep *EpollPoller, err error)

func (*EpollPoller) ClosePoller

func (ep *EpollPoller) ClosePoller() error

func (*EpollPoller) Poll

func (ep *EpollPoller) Poll() error

func (*EpollPoller) PollSize

func (ep *EpollPoller) PollSize() int

func (*EpollPoller) Register

func (ep *EpollPoller) Register(fd int) error

func (*EpollPoller) SetAutoClose

func (ep *EpollPoller) SetAutoClose(x bool)

func (*EpollPoller) SetOnCloseCallback

func (ep *EpollPoller) SetOnCloseCallback(f func(fd int))

func (*EpollPoller) SetOnDataCallback

func (ep *EpollPoller) SetOnDataCallback(f func(fd int))

type NetPoll

type NetPoll interface {
	PollSize() int
	Poll() error

	Register(fd int) error

	SetOnCloseCallback(func(fd int))
	SetOnDataCallback(func(fd int))

	SetAutoClose(bool)

	ClosePoller() error
}

func NewPoller

func NewPoller(PollSize int) (ep NetPoll, err error)

Directories

Path Synopsis
examples
echo command

Jump to

Keyboard shortcuts

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