MdnsLite.add_mdns_services
You're seeing just the function
add_mdns_services
, go back to MdnsLite module for more information.
Add services for mdns_lite to advertise
The services
section lists the services that the host offers, such as
providing an HTTP server. You must supply the protocol
, transport
and
port
values for each service. You may also specify weight
and/or host
.
They each default to a zero value. Please consult the RFC for an explanation
of these values. Services can be configured in config.exs
as shown above,
or at runtime:
iex> services = [
# service type: _http._tcp.local - used in match
%{
name: "Web Server",
protocol: "http",
transport: "tcp",
port: 80,
},
# service_type: _ssh._tcp.local - used in match
%{
name: "Secure Socket",
protocol: "ssh",
transport: "tcp",
port: 22,
}
]
iex> MdnsLite.add_mds_services(services)
:ok