Clone wiki

as3Bonjour / Home

THIS REPOSITTORY IS NO LONGER MAINTAINED DUE TO ADOBE STRATEGY FOR AS3 FUTURE

as3Bonjour

This native extension allows basic operations for resolving Bonjour services. Currently is compiled for Mac OSx and Windows, and it will be soon available for iOS. It is based on Poco C++ Remoting library.

Licence

The library is distributed under the GNU Lesser General Public License.

Download

You can download packaged extension here.

Documentation

ASDOC documentation can be found here.

Example

public var bonjour: Bonjour;
...

if (Bonjour.isSupported()) {
     bonjour = new Bonjour();
     bonjour.addEventListener(BonjourEvent.DNSSD_SERVICE_FOUND, onServiceFound);
     bonjour.addEventListener(BonjourEvent.DNSSD_SERVICE_RESOLVED, onServiceResolved);
     bonjour.addEventListener(BonjourEvent.DNSSD_SERVICE_REMOVED, onServiceRemoved);
     bonjour.addEventListener(BonjourEvent.DNSSD_HOST_RESOLVED, onHostResolved);

     bonjour.addEventListener(BonjourEvent.DNSSD_ERROR, onBonjourError);

     bonjour.browse('_services._dns-sd._udp', '');
} else {
     trace("Bonjour extension is not supported.");
}

...

protected function onServiceResolved(event: BonjourEvent): void {
				var service: Service = event.info as Service;
          ...
			}

See as3BonjourBrowser simple example for more details.

Have fun!

Updated