Files
mediamtx/internal/protocols/udp/params.go
T
Alessandro RosandGitHub 35e1f486c9 add integrated packet dumper (#5488)
this allows to dump any incoming and outgoing packet, to disk, in
pcapng format.
2026-02-22 13:34:05 +01:00

20 lines
353 B
Go

package udp
import "net/url"
// Params are the parameters of a UDP listener.
type Params struct {
Address string
Source string
IntfName string
}
// URLToParams converts a URL to Params.
func URLToParams(u *url.URL) *Params {
return &Params{
Address: u.Host,
Source: u.Query().Get("source"),
IntfName: u.Query().Get("interface"),
}
}