YHEchoPackage/tcp/config.go

35 lines
805 B
Go
Raw Normal View History

2023-02-09 13:35:14 +08:00
/*
* (c) 2022.
* .
*
* :mic
* Email:funui@outlook.com
*/
2023-02-09 16:03:51 +08:00
package tcpgnet
2023-02-09 13:35:14 +08:00
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
}
)