Closed benoitc closed 13 years ago
Can you provide some more details on this? On my system - https://gist.github.com/79421f9feeca73052064
Hum figured it. When you register without settings the domain you get all registration events for this port & type. I wasn't paying attention to that. Sorry for the noise.
#!/usr/bin/env escript
%%! -pa dnssd_erlang/ebin
main(_) ->
ok = dnssd:start(),
{ok, _Ref1} = dnssd:register("test", "_test._tcp", 1),
{ok, _Ref2} = dnssd:register("test", "_test._tcp", 2),
main().
main() ->
receive Term -> io:format("~p~n", [Term]) end,
main().
result in:
$ ./test_issue4_dnssd.escript
{dnssd,#Ref<0.0.0.57>,
{register,add,{<<"test">>,<<"_test._tcp.">>,<<"local.">>}}}
{dnssd,#Ref<0.0.0.54>,
{register,add,
{<<"test">>,<<"_test._tcp.">>,
<<"bchesneau.members.mac.com.">>}}}
{dnssd,#Ref<0.0.0.57>,
{register,add,
{<<"test">>,<<"_test._tcp.">>,
<<"bchesneau.members.mac.com.">>}}}
{dnssd,#Ref<0.0.0.54>,
{register,add,{<<"test (2)">>,<<"_test._tcp.">>,<<"local.">>}}}
When service name is incremented, new name is not available in events.