chore: add desc to tcp and quic config

This commit is contained in:
langhuihui
2023-12-12 20:11:32 +08:00
parent 434de39d3a
commit c8fbf37487
2 changed files with 9 additions and 9 deletions
+3 -3
View File
@@ -13,9 +13,9 @@ type QuicConfig interface {
}
type Quic struct {
ListenAddr string
CertFile string
KeyFile string
ListenAddr string `desc:"监听地址,格式为ip:port,ip 可省略默认监听所有网卡"`
CertFile string `desc:"证书文件"`
KeyFile string `desc:"私钥文件"`
}
func (q *Quic) ListenQuic(ctx context.Context, plugin QuicPlugin) error {
+6 -6
View File
@@ -24,12 +24,12 @@ type TCPConfig interface {
}
type TCP struct {
ListenAddr string
ListenAddrTLS string
CertFile string
KeyFile string
ListenNum int //同时并行监听数量,0为CPU核心数量
NoDelay bool //是否禁用Nagle算法
ListenAddr string `desc:"监听地址,格式为ip:port,ip 可省略默认监听所有网卡"`
ListenAddrTLS string `desc:"监听地址,格式为ip:port,ip 可省略默认监听所有网卡"`
CertFile string `desc:"证书文件"`
KeyFile string `desc:"私钥文件"`
ListenNum int `desc:"同时并行监听数量,0为CPU核心数量"` //同时并行监听数量,0为CPU核心数量
NoDelay bool `desc:"是否禁用Nagle算法"` //是否禁用Nagle算法
}
func (tcp *TCP) listen(l net.Listener, handler func(net.Conn)) {