43 lines
976 B
Go
43 lines
976 B
Go
/*
|
|
* 版权所有 (c) 上海元泓软件科技有限公司 2023.
|
|
* 严禁通过任何媒介未经授权复制本文件.
|
|
*
|
|
* 作者:mic
|
|
* Email:funui@outlook.com
|
|
*/
|
|
|
|
/*
|
|
* 版权所有 (c) 上海元泓软件科技有限公司 2022.
|
|
* 严禁通过任何媒介未经授权复制本文件.
|
|
*
|
|
* 作者:mic
|
|
* Email:funui@outlook.com
|
|
*/
|
|
|
|
package wsgnet
|
|
|
|
type (
|
|
// A EchoConf is a socket API server config.
|
|
EchoConf struct {
|
|
// Valid network schemes:
|
|
// tcp - bind to both IPv4 and IPv6
|
|
// tcp4 - IPv4
|
|
// tcp6 - IPv6
|
|
// udp - bind to both IPv4 and IPv6
|
|
// udp4 - IPv4
|
|
// udp6 - IPv6
|
|
// unix - Unix Domain Socket
|
|
Network string
|
|
Host string `json:",default=0.0.0.0"`
|
|
Port int
|
|
CertFile string `json:",optional"`
|
|
KeyFile string `json:",optional"`
|
|
MaxConns int `json:",default=10000"`
|
|
|
|
// 协议包信息
|
|
Timeout int64 `json:",default=15000"`
|
|
Magic uint32 //包头
|
|
Key string //包数据校验Key
|
|
}
|
|
)
|