nerves_dnssd v0.3.1 Nerves.Dnssd View Source
The Nerves.Dnssd
application.
The application will (in an embedded setting) manage the mDNS daemon. Once the application is started services can be registered and browsed via the Erlang API.
In the most basic situation, where one wants to simply register a service on the network, calling
iex> {:ok, pid} = Nerves.Dnssd.register("Fancy service name", "_http._tcp", 8080)
iex> is_pid(pid)
true
is sufficient to register a HTTP service listening on port 8080. In case there is already a service named “Fancy service name” a new name will be determined by using a follow-up number and that name will be registered, so that after a restart the service will advertise itself with the same name.
If you want to do more, you’ll have to use the dnssd interface.