![]() |
|
Getting started with Howl
| Build a man a fire, and he'll be warm for a day. Set a man on fire, and he'll be warm for the rest of his life. | ||||
|
-Terry Pratchett
|
||||
| Howl is a cross-platform implementation of the Zeroconf networking standard. Branded as Bonjour tm by Apple Computer, Inc., Zeroconf standardizes networking protocols for delivering hassle-free ad-hoc networking, service discovery, and IP configuration.
Howl contains both runtime components, which deliver the Zeroconf/Bonjour functionality, and an SDK for embedding Zeroconf/Bonjour functionality in your applications. Obtaining Howl Howl source code can be downloaded from www.porchdogsoft.com. Installing Howl Click here for installation instructions. Runtime The runtime pieces are a set of libraries and a daemon that Howl clients can communicate with to publish and browse network services. Instructions for starting the daemon are provided in the installation instructions. SDK The SDK contains header files (located in include), libraries (located in lib), two example programs (described below), and API documentation (located in docs). Examples The SDK ships with two small console programs, publish and browse , that illustrate how to use the Howl SDK. The example programs are located in <HOWL_ROOT>/samples/console/publish and <HOWL_ROOT>/samples/console/browse. Publish mDNSPublish is a simple example of how to publish a service with Howl. This section describes how publish uses Howl's sw_discovery_init(), sw_discovery_publish(), and sw_discovery_run() APIs to publish a web service. Please refer to the Howl API documentation for a detailed description of the complete set of Howl's Discovery APIs. mDNSPublish publishes a new service with Howl using name, service type, port number, and any additional service-specific information passed on the command line. Click here to see the mDNSPublish code. mDNSPublish first includes the howl.h header to access Howl's discovery APIs. publish then implements a sw_discovery_publish_reply handler function to get the results of an attempt to publish. The Howl system service invokes the this reply handler when the attempt to publish completes. Most of the work is performed by main(). main() first declares a sw_discovery session instance and an sw_result, which will be used in almost every Howl API call. main() also declares a sw_discovery_publish_id, which can be used by publish in the reply handler to identify the publish attempt that it corresponds to. Before any other discovery APIs are called, main() calls sw_discovery_init() to initialize the discovery session. main() then calls sw_discovery_publish() to publish the service decribed by the name, type, and port passed on the command line. Browse mDNSBrowse is an example of how to browse for services. This section describes how browse uses Howl's sw_discovery_init(), sw_discovery_browse(), and sw_discovery_run() APIs to browse available services of a given type. Please refer to the Howl API documentation for a detailed description of the complete set of Howl's Discovery APIs. mDNSBrowse browses available services with Howl using name, service type, port number, and any additional service-specific information passed on the command line. Click here to see the code for the browse example. mDNSBrowse first includes the howl header to access Howl's discovery APIs. browse then implements a sw_discovery_resolve_reply handler function to get the results of an attempt to browse. The Howl system service invokes the this reply handler when the attempt to browse completes. Most of the work is performed by main(). main() first declares a sw_discovery session instance and an sw_result, which will be used in almost every Howl Discovery API call. main() also declares a sw_discovery_browse_id, which can be used by browse in the reply handler to identify the resolve attempt that it corresponds to. Before any other discovery APIs are called, main() calls sw_discovery_init() to initialize the discovery session. main() then calls sw_discovery_browse_services() to browse the services decribed by the name passed on the command line. Questions Any questions, comments, confusions, or suggestions can be sent to howl@porchdogsoft.com. Thank you for using Howl Copyright © 2003 - 2007 Porchdog Software. All rights reserved. |
||