add kcp dialer

This commit is contained in:
ginuerzh
2021-12-16 19:03:56 +08:00
parent 5bd3c25c65
commit a52cd9a4c2
19 changed files with 395 additions and 78 deletions

View File

@ -30,3 +30,15 @@ func DialFuncDialOption(dialf func(ctx context.Context, addr string) (net.Conn,
opts.DialFunc = dialf
}
}
type HandshakeOptions struct {
Addr string
}
type HandshakeOption func(opts *HandshakeOptions)
func AddrHandshakeOption(addr string) HandshakeOption {
return func(opts *HandshakeOptions) {
opts.Addr = addr
}
}