How to use Bonjour in Mac and Windows

Bill Vlahos bvlahos at mac.com
Sat Sep 28 18:17:53 EDT 2013


Monte,

If I enter the following line in the terminal (on Mac) it properly registers the Bonjour service:
dns-sd -R "Play the Game" _playbodd._tcp . 45567 path=/game
Note that the terminal does not give the cursor back but does register the service. I have to control-z.

If I enter the following line in the LiveCode Message Box it also properly returns information like it does in the terminal
shell("dns-sd")
> dns-sd -E                  (Enumerate recommended registration domains)
> dns-sd -F                      (Enumerate recommended browsing domains)
> dns-sd -R <Name> <Type> <Domain> <Port> [<TXT>...] (Register a service)
> dns-sd -B        <Type> <Domain>        (Browse for services instances)
> dns-sd -L <Name> <Type> <Domain>           (Look up a service instance)
> dns-sd -P <Name> <Type> <Domain> <Port> <Host> <IP> [<TXT>...]  (Proxy)
> dns-sd -q <name> <rrtype> <rrclass> (Generic query for any record type)
> dns-sd -Z        <Type> <Domain>   (Output results in Zone File format)
> dns-sd -G     v4/v6/v4v6 <name>  (Get address information for hostname)
> dns-sd -V    (Get version of currently running daemon / system service)

If I enter the following line in the LiveCode Message Box it returns an error.
shell("dns-sd -R "Play the Game" _playbodd._tcp . 45567 path=/game")
> Message execution error:
> Error description: Handler: can't find handler
> Hint: shell("dns-sd

1. How can I get LiveCode to enter the complete shell command?
2. How can I get LiveCode to not lock up after the command is entered?
3. Once I am successful at registering the Bonjour service how can I stop the service? I don't see an entry in the dns-sd man page.

Bill Vlahos
_________________
http://www.linkedin.com/in/billvlahos/
InfoWallet (http://www.infowallet.com) is about keeping your important life information with you, accessible, and secure.
lcTaskList: (http://www.infowallet.com/lctasklist/index.htm)
RunRev lcTaskList Forum: (http://forums.runrev.com/viewforum.php?f=61)

On Sep 26, 2013, at 5:33 PM, Monte Goulding <monte at sweattechnologies.com> wrote:

>> I need this for both Macintosh and Windows. It seems like we should be able to do this natively in LiveCode rather than an external. Are there any example stacks or commands?
>> 
>> I did find this link on Jan's site but it requires jAVA.
>> http://quartam.blogspot.com/2011/01/zeroconfbonjour-in-livecode-with-jmdns.html
> 
> I wasn't talking about an external. I said dns-sd which is a command line app. Why does it seem we should be able to do this natively in LiveCode? Is it an undocumented feature?
> 
> Cheers
> 
> --
> M E R Goulding 




More information about the use-livecode mailing list