conf

package
v1.0.6 Latest Latest
Warning

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

Go to latest
Published: Feb 3, 2021 License: Apache-2.0 Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Set

func Set(cfg *Data)

Set this before startup server

Types

type Data

type Data struct {
	// 单个连接未处理消息包缓存队列大小
	// 注意:[超过这个大小,包将丢弃,视为当前系统无法处理,默认100]
	ConnUndoQueueSize int
	// 单个连接未写入消息包队列大小 [超过这个大小,包将丢弃,视为当前系统无法处理,默认为1]
	ConnWriteQueueSize int
	// 第一个包等待超市时间 (s) [默认5秒,连接上来未读到正确包,断开连接]
	FirstPackageTimeout int
	// 连接读取超时(s) [默认35秒, 超时等待时间内,请发送任何数据包,如心跳包]
	ConnReadTimeout int
	// 连接写超时(s) [默认5秒, 超时等待时间内,请发送任何数据包,如心跳包]
	ConnWriteTimeout int
	// 数据包最大限制,[默认2048]
	MaxDataPackageSize int
	// ws 最大header,[默认1024]
	MaxHeaderLen int
}

Data is the config struct

var (
	// C is the config instance
	C *Data
)

Jump to

Keyboard shortcuts

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