Feature: bind socket to interface by native API on Windows (#2662)
This commit is contained in:
@ -10,6 +10,7 @@ var (
|
||||
|
||||
type option struct {
|
||||
interfaceName string
|
||||
fallbackBind bool
|
||||
addrReuse bool
|
||||
routingMark int
|
||||
}
|
||||
@ -22,6 +23,12 @@ func WithInterface(name string) Option {
|
||||
}
|
||||
}
|
||||
|
||||
func WithFallbackBind(fallback bool) Option {
|
||||
return func(opt *option) {
|
||||
opt.fallbackBind = fallback
|
||||
}
|
||||
}
|
||||
|
||||
func WithAddrReuse(reuse bool) Option {
|
||||
return func(opt *option) {
|
||||
opt.addrReuse = reuse
|
||||
|
Reference in New Issue
Block a user