github.com/TeaOSLab/EdgeNode@v1.3.8/internal/nodes/listener_interface.go (about) 1 package nodes 2 3 import "github.com/TeaOSLab/EdgeCommon/pkg/serverconfigs" 4 5 // ListenerInterface 各协议监听器的接口 6 type ListenerInterface interface { 7 // Init 初始化 8 Init() 9 10 // Serve 监听 11 Serve() error 12 13 // Close 关闭 14 Close() error 15 16 // Reload 重载配置 17 Reload(serverGroup *serverconfigs.ServerAddressGroup) 18 19 // CountActiveConnections 获取当前活跃的连接数 20 CountActiveConnections() int 21 }