epoll

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Oct 22, 2020 License: BSD-3-Clause Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ConfigItem

type ConfigItem struct {
	Addr string `yaml:"addr" json:"addr"`
}

type ConnectionHandler

type ConnectionHandler func([]byte, io.Writer) error

type Epoll

type Epoll struct {
	sync.RWMutex
	// contains filtered or unexported fields
}

func NewEpoll

func NewEpoll(log logger.Logger) (*Epoll, error)

func (*Epoll) AddOrClose

func (_epoll *Epoll) AddOrClose(c net.Conn) error

func (*Epoll) Close

func (_epoll *Epoll) Close(c *netConnItem) error

func (*Epoll) CloseAll

func (_epoll *Epoll) CloseAll() (er error)

func (*Epoll) Wait

func (_epoll *Epoll) Wait() (NetConns, error)

type EpollConfig

type EpollConfig struct {
	Epoll ConfigItem `yaml:"epoll" json:"epoll"`
}

http server config

type NetConns

type NetConns []*netConnItem

type Server

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

func NewCustomServer

func NewCustomServer(conf ConfigItem, log logger.Logger) *Server

func NewServer

func NewServer(conf EpollConfig, log logger.Logger) *Server

func (*Server) Down

func (_srv *Server) Down() (err error)

func (*Server) Handler

func (_srv *Server) Handler(h ConnectionHandler)

func (*Server) Up

func (_srv *Server) Up() (err error)

Jump to

Keyboard shortcuts

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