engine

package
v0.0.0-...-a12e6e1 Latest Latest
Warning

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

Go to latest
Published: Feb 21, 2021 License: MIT Imports: 14 Imported by: 0

Documentation

Index

Constants

View Source
const LB = 1 << 6

Variables

This section is empty.

Functions

func NewPollServer

func NewPollServer(addr string) *loopServer

func NewStdServer

func NewStdServer(addr string) *stdServer

func SetKeepAlive

func SetKeepAlive(fd, secs int) error

func SockaddrToAddr

func SockaddrToAddr(sa syscall.Sockaddr) net.Addr

Types

type PollIF

type PollIF interface {
	ChangeRW(fd int)
	ChangeDetach(fd int)
	ChangeRead(fd int)
	AddRW(fd int)
	AddRead(fd int)
	Looping(execute func(fd int) error)
	Close() error
	Trigger(note interface{}) error
}

type Server

type Server interface {
	Run()
	Type(typ TYPE)
}

func NewServer

func NewServer(mod string, addr string) Server

type Signal

type Signal int
const (
	None Signal = iota
	Detach
	Close
	Shutdown
)

type TYPE

type TYPE string
const (
	HTTP TYPE = "http"
	TCP  TYPE = "tcp"
)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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