server

package
v0.0.0-...-a2a6e8a Latest Latest
Warning

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

Go to latest
Published: Aug 20, 2019 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	// 业务函数
	HandleFunc func(ctx *Context)
	// 设置TCP的参数
	SetTcpFunc  func(conn *net.Conn)
	ConnLimit   int32
	ConnTimeOut time.Duration
}

ServerConfig 服务通用配置

type Context

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

func (*Context) Next

func (c *Context) Next()

type HandleFunc

type HandleFunc func(ctx *Context)

type Server

type Server interface {
	Run() (*session.Session, error)
	Shutdown() error
	Use(h HandleFunc)
	ReStart() error
	Reload(conf Config) error
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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