sing-box/inbound/default_tcp_go1.20.go

19 lines
371 B
Go
Raw Normal View History

2023-08-16 17:47:24 +08:00
//go:build go1.20
package inbound
import (
"context"
"net"
2024-08-27 11:23:20 +08:00
"github.com/metacubex/tfo-go"
2023-08-16 17:47:24 +08:00
)
const go120Available = true
func listenTFO(listenConfig net.ListenConfig, ctx context.Context, network string, address string) (net.Listener, error) {
var tfoConfig tfo.ListenConfig
tfoConfig.ListenConfig = listenConfig
return tfoConfig.Listen(ctx, network, address)
}