Files
mediamtx/internal/protocols/unix/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

23 lines
308 B
Go

package unix
import "net/url"
// Params are the parameters of a unix listener.
type Params struct {
Path string
}
// URLToParams converts a URL to Params.
func URLToParams(u *url.URL) *Params {
var pa string
if u.Path != "" {
pa = u.Path
} else {
pa = u.Host
}
return &Params{
Path: pa,
}
}