This module is the main interface to the application.
The enumerate, browse,
resolve and register functions all
return {ok, op_ref()} or {error, term()}.
Results are then sent to the calling process in messages of the form
result_message(). If the operation crashes a message of the form
{dnssd, op_ref(), crash} will be sent.
The synchronous resolve wrapper
resolve_sync returns
{ok, resolve_sync_result()} or {error, term()}.
op_ref() to stop/1.
Operations will also be stopped if the calling process exits.
browse_result() = {browse, add | remove, {name(), type(), domain()}}
domain() = binary() | iolist()
domain_type() = reg | browse
enumerate_result() = {enumerate, add | remove, binary()}
hostname() = binary() | iolist()
ip_port() = 0..65535
name() = binary() | iolist()
abstract datatype: op_ref()
register_result() = {register, add | remove, {name(), type(), domain()}}
resolve_result() = {resolve, {hostname(), ip_port(), txt_strings()}}
resolve_sync_result() = {hostname(), ip_port(), txt_strings()}
result() = enumerate_result() | browse_result() | resolve_result() | register_result()
result_message() = {dnssd, op_ref(), result()}
txt_string() = {atom() | iolist(), atom(), iolist()} | iolist()
txt_strings() = <<>> | <<_:8, _:_*8>> | [txt_string()]
type() = binary() | iolist()
| browse/1 | Equivalent to browse(Type, <<>>).
|
| browse/2 | Browse for services. |
| enumerate/1 | Enumerate browse or registration domains. |
| register/2 | Equivalent to register(Type, Port, <<>>).
|
| register/3 | edoc doesn't pickup the alternative invocation which is: register(Type::iolist(), Port::integer(), Txt::list() | iolist()). |
| register/4 | Equivalent to register(Name, Type, Port, Txt, <<>>, <<>>).
|
| register/6 | Register a service. |
| resolve/3 | Resolve a service instance. |
| resolve_sync/3 | Equivalent to resolve_sync(Name, Type, Domain, 5000).
|
| resolve_sync/4 | Returns the first result from resolving a service instance and then cancels the operation. |
| results/1 | Retrieve the current results of an operation. |
| start/0 | Start the DNSSD application. |
| stop/0 | Stop the DNSSD application. |
| stop/1 | Stop a DNSSD operation. |
Equivalent to browse(Type, <<>>).
Browse for services. If domain is empty, browse all domains.
enumerate(Type::domain_type()) -> {ok, op_ref()} | {error, term()}
Enumerate browse or registration domains
Equivalent to register(Type, Port, <<>>).
register(Name::name(), Type::type(), Port::ip_port()) -> {ok, op_ref()} | {error, term()}
register(Name::type(), Type::ip_port(), Port::txt_strings()) -> {ok, op_ref()} | {error, term()}
Equivalent to register(Name, Type, Port, Txt).
edoc doesn't pickup the alternative invocation which is: register(Type::iolist(), Port::integer(), Txt::list() | iolist())
register(Name::name(), Type::type(), Port::ip_port(), Txt::txt_strings()) -> {ok, op_ref()} | {error, term()}
Equivalent to register(Name, Type, Port, Txt, <<>>, <<>>).
register(Name::name(), Type::type(), Port::ip_port(), Txt::txt_strings(), Host::hostname(), Domain::domain()) -> {ok, op_ref()} | {error, term()}
Register a service. If localhost is passed as Host the service will be registered only on the local machine.
Resolve a service instance.
resolve_sync(Name::name(), Type::type(), Domain::domain()) -> {ok, resolve_sync_result()} | {error, term()}
Equivalent to resolve_sync(Name, Type, Domain, 5000).
resolve_sync(Name::name(), Type::type(), Domain::domain(), Timeout::pos_integer()) -> {ok, resolve_sync_result()} | {error, term()}
Returns the first result from resolving a service instance and then cancels the operation. Times out after Timeout milliseconds.
Retrieve the current results of an operation
start() -> ok | {error, term()}
Start the DNSSD application
stop() -> ok | {error, term()}
Stop the DNSSD application
stop(Ref::op_ref()) -> ok | {error, term()}
Stop a DNSSD operation
Generated by EDoc