Allow setting priority on listeners and multicast interfaces

This commit is contained in:
Neil Alexander 2022-10-19 23:31:13 +01:00
parent 7ae30eed44
commit bb389dbddd
9 changed files with 44 additions and 29 deletions

View file

@ -362,3 +362,12 @@ func (c *linkConn) Write(p []byte) (n int, err error) {
atomic.AddUint64(&c.tx, uint64(n))
return
}
func linkOptionsForListener(u *url.URL) (l linkOptions) {
if p := u.Query().Get("priority"); p != "" {
if pi, err := strconv.ParseUint(p, 10, 8); err == nil {
l.priority = uint8(pi)
}
}
return
}