mirror of
https://gitclone.com/github.com/MetaCubeX/Clash.Meta
synced 2024-11-15 13:41:23 +08:00
19 lines
274 B
Go
19 lines
274 B
Go
package outboundgroup
|
|
|
|
import (
|
|
"net"
|
|
"time"
|
|
)
|
|
|
|
func tcpKeepAlive(c net.Conn) {
|
|
if tcp, ok := c.(*net.TCPConn); ok {
|
|
_ = tcp.SetKeepAlive(true)
|
|
_ = tcp.SetKeepAlivePeriod(30 * time.Second)
|
|
}
|
|
}
|
|
|
|
type SelectAble interface {
|
|
Set(string) error
|
|
ForceSet(name string)
|
|
}
|