Clash.Meta/adapter/inbound/listen.go

19 lines
377 B
Go
Raw Normal View History

2022-11-16 10:43:16 +08:00
package inbound
import (
"context"
"net"
)
func SetMPTCP(open bool) {
setMultiPathTCP(getListenConfig(), open)
}
2022-11-16 10:43:16 +08:00
func ListenContext(ctx context.Context, network, address string) (net.Listener, error) {
return lc.Listen(ctx, network, address)
}
func Listen(network, address string) (net.Listener, error) {
return ListenContext(context.Background(), network, address)
}