utils

package
v0.0.0-...-a0c5203 Latest Latest
Warning

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

Go to latest
Published: Jul 1, 2020 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 GlobalObj

type GlobalObj struct {
	/*
		Server
	*/
	TcpServer ziface.IServer // 当前全局的server对象
	Host      string         // 当前服务器主机监听的IP
	TcpPort   int            // 当前服务器主机监听的端口号
	Name      string         // 当前服务器名称

	/*
		zinx
	*/
	Version        string // 版本号
	MaxConn        int    // 当前服务器主机允许的最大连接数
	MaxPackageSize uint32 // 当前框架数据包最大值
}

存储一切框架的全局参数,供其他模块使用 通过zinx.json由用户配置

var GlobalObject *GlobalObj

定义一个全局的对外Globalobj

func (*GlobalObj) Reload

func (g *GlobalObj) Reload()

从zinx.json中加载自定义的参数

Jump to

Keyboard shortcuts

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