bendiken / adhoc

Ad-hoc service discovery and routing for DNS-SD (aka Bonjour) and XMPP (per the XEP-0030 spec).

This URL has Read+Write access

adhoc /
name age message
file .gemspec Fri Dec 25 13:59:19 -0800 2009 Updated gemspec. [bendiken]
file .gitignore Sun Dec 20 07:00:06 -0800 2009 Updated .gitignore. [bendiken]
file .yardopts Sun Dec 20 06:59:05 -0800 2009 Imported YARD documentation settings. [bendiken]
file AUTHORS Sun Dec 20 06:30:23 -0800 2009 Unlicensed the project into the public domain. [bendiken]
file README Sun Dec 20 06:59:33 -0800 2009 Changed README format from RDoc to Markdown. [bendiken]
file README.md Mon Dec 21 17:21:04 -0800 2009 Added a command-line usage example. [bendiken]
file Rakefile Mon Dec 21 17:23:48 -0800 2009 Updated Rakefile. [bendiken]
file UNLICENSE Sun Dec 20 06:30:23 -0800 2009 Unlicensed the project into the public domain. [bendiken]
file VERSION Fri Dec 25 14:00:05 -0800 2009 Bumped version to 0.1.1. [bendiken]
directory bin/ Fri Dec 25 13:55:30 -0800 2009 Implemented discovery of all known protocols. [bendiken]
directory doc/ Fri Apr 24 19:47:28 -0700 2009 Created project structure. [bendiken]
directory lib/ Fri Dec 25 14:00:05 -0800 2009 Bumped version to 0.1.1. [bendiken]
README.md

Adhoc.rb: Ad-hoc Service Discovery for Ruby

Ad-hoc service discovery and routing for DNS-SD (aka Bonjour) and XMPP (per the XEP-0030 spec).

About DNS Service Discovery (DNS-SD)

About XMPP Service Discovery (XEP-0030)

Examples

require 'adhoc'

Discovering HTTP services

Adhoc.discover!(:http) do |service|
  puts service.to_uri
end

Discovering services with a timeout

# Print anything we can discover within 3 seconds:
Adhoc.discover!(:http, :timeout => 3.0) do |service|
  puts service.to_uri
end

Discovering services from the command line

% adhoc discover http sftp ssh
Discovering services: http, sftp, ssh...
<sftp://macbook.local.:22> My MacBook
<ssh://macbook.local.:22> My MacBook
<http://macpro.local./> My Mac Pro
<sftp://macpro.local.:22> My Mac Pro
<ssh://macpro.local.:22> My Mac Pro

Documentation

Download

To get a local working copy of the development repository, do:

% git clone git://github.com/bendiken/adhoc.git

Alternatively, you can download the latest development version as a tarball as follows:

% wget http://github.com/bendiken/adhoc/tarball/master

Requirements

Installation

The recommended installation method is via RubyGems. To install the latest official release from Gemcutter, do:

% [sudo] gem install adhoc

Resources

Author

License

Adhoc.rb is free and unencumbered public domain software. For more information, see http://unlicense.org/ or the accompanying UNLICENSE file.