Skip to content

Commit

Permalink
more formatting experiments
Browse files Browse the repository at this point in the history
  • Loading branch information
agnat committed Aug 30, 2010
1 parent 875100f commit ce83cb7
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion README.textile
Expand Up @@ -28,15 +28,19 @@ ad.start();

And here is how to browse all HTTP servers on the local network:

bc. var browser = mdns.createBrowser('http');
bc.. var browser = mdns.createBrowser('http');

browser.on('serviceUp', function(info, flags) {
sys.puts("Up: " + sys.inspect(info));
});

browser.on('serviceDown', function(info, flags) {
sys.puts("Down: " + sys.inspect(info));
});

browser.start();


As you can see the browser object is an EventEmitter. For each HTTP server a 'serviceUp' event is emitted. Likewise, if a server disappears 'serviceDown' is send. A 'serviceUp' info object might look like this:

bc. { interfaceIndex: 4
Expand Down

0 comments on commit ce83cb7

Please sign in to comment.