Zeroconf API
mopidy.zeroconf
Classes:
-
Zeroconf–Publish a network service with Zeroconf.
Zeroconf
Zeroconf(
name: str,
stype: str,
port: int,
domain: str = "",
host: str = "",
text: list[str] | None = None,
)
Publish a network service with Zeroconf.
Currently, this only works on Linux using Avahi via D-Bus.
Parameters:
-
(namestr) –Human readable name of the service, e.g.
'MPD on neptune'. -
(stypestr) –Service type, e.g.
'_mpd._tcp'. -
(portint) –TCP port of the service, e.g.
6600. -
(domainstr, default:'') –Local network domain name, defaults to
''. -
(hoststr, default:'') –Interface to advertise the service on, defaults to
''. -
(textlist[str] | None, default:None) –Extra information depending on
stype, defaults to empty list.
Methods:
unpublish
unpublish() -> None
Unpublish the service.
Call when your service shuts down.