Clash.Meta/adapter/outboundgroup/util.go

18 lines
251 B
Go
Raw Normal View History

package outboundgroup
import (
"net"
"time"
)
func tcpKeepAlive(c net.Conn) {
if tcp, ok := c.(*net.TCPConn); ok {
2022-04-20 01:52:51 +08:00
_ = tcp.SetKeepAlive(true)
_ = tcp.SetKeepAlivePeriod(30 * time.Second)
}
}
2022-05-23 00:40:27 +08:00
type SelectAble interface {
Set(string) error
}