Feature: mark on socket (#1705)

This commit is contained in:
bobo liu
2021-11-08 16:59:48 +08:00
committed by GitHub
parent e622d8dd38
commit bd2ea2b917
11 changed files with 119 additions and 22 deletions

View File

@ -10,6 +10,7 @@ var (
type option struct {
interfaceName string
addrReuse bool
routingMark int
}
type Option func(opt *option)
@ -25,3 +26,9 @@ func WithAddrReuse(reuse bool) Option {
opt.addrReuse = reuse
}
}
func WithRoutingMark(mark int) Option {
return func(opt *option) {
opt.routingMark = mark
}
}