Bonjour Service Discovery Sample

Purpose

This sample demonstrates how to use ZeroConf service discovery mechanism for both publishing and discovering services on the network.

Prerequisites

Bonjour for Windows is required to run this sample. It can be downloaded free of charge from the Apple's website http://support.apple.com/downloads/Bonjour_for_Windows.

How it works

First, the service have to be made discoverable. To make a service discoverable it is necessary to do two things:

The TROZeroConfBrowser component is used to discover available services on the network. Discovery process is performed in the background and corresponding events are being fired. When application is notified about new service available it have to start resolve procedure to obtain host name (address) and port number where to connect to. After hast name and port are obtained, the application can construct target URL and connect to the server as ususal.

Examine the code

Getting started