Switch to: V14V13V12V11V10V9V8V7V6V5

Using Bonjour Service

Valentina Server supports Bonjour Service of Apple Computer.

This feature was added in Valentina 2.5.


Bonjour is Apple Computer's implementation of zero-configuration networking known generally as “zero config”. It enables automatic discovery of computers, devices, and services on IP networks without having a knowledgeable person manually configure DNS servers. The Apple-specific implementation is available for MacOS X, Windows, Linux, BSD Unix and others.

Apple pioneered the use of Bonjour in an effort to move from proprietary AppleTalk - Bonjour is built right into the operating system.

The Bonjour has a very modest footprint. For servers, there is zero overhead on the MacOS X. Windows and Linux requires an installation of Bonjour since it is not built into the operating system.

Bonjour in Valentina Studio and Valentina Server

Bonjour was incorporated into Valentina Server and Valentina Studio. Valentina Studio lets you create, browse, query and administrate local databases as well as servers, so you can quickly and easily locate copies of Valentina Server on your network.

Read more about creating connection shortcuts in Valentina Studio.

A Usage Scenario in K-12 Education

Let's say you've developed a modular series on US history that you want to deploy throughout all the middle schools in your school district. A portion of your curriculum combines lecture, guided learning, and independent study and you've developed a series of biographical lessons that incorporate sound, famous speeches and video clips of historical events. After each section, you want to test for comprehension in user paced quizzes. The rest is collected into a database to assess student preparedness for semester exams.

With Bonjour, your history teachers do not have to involve any IT specialists to set up your solution. The same student application is installed on each computer in each lab (Mac or Windows), a server on any computer in the network, and the teacher's reporting application on the teacher's computer. When the student starts a session, your student application automatically locates the server on the network and periodically collects performance information that is then stored on the server. Your teacher's reporting application, likewise, can find the server on the network and periodically query the server to monitor performance throughout the class period.

Server-Side Steps to Use Bonjour

On default, Valentina Server generates the INI-file with enabled bonjour service


Valentina Server on default registers self with the name “Valentina Server”, and in the log file you can see the following line about successful registration of Bonjour Service:

Bonjour service registered at Valentina Server._valentina._tcp.local.

If the computer, where Valentina Server is started, do not have Bonjour Service but the BonjourEnable flag is 1, then in the log will be produced notification message about failure to register bonjour service.

If Valentina Server listens also for SSL and/or HTTP ports then will be registered additional services:

Bonjour service registered at Valentina Server._valentina-ssl._tcp.local.
Bonjour service registered at Valentina Server._valentina-http._tcp.local.

Client-Side Steps to Use Bonjour

Support of Bonjour on the client side is expressed in single function of a Valentina ADK that returns the array of strings - Bonjour descriptions of servers that run service of a specific type.

For example to find Valentina Server you need call it as:

ArrayOfStrings bnj_services = Valentina.LocateBonjourService( "_valentina._tcp" )

Having the array of strings you can:

1. Display list of found services in some GUI. You may wish transform strings before displaying them. Later, when user clicks some item you do connect to that server.

2. Iterate strings in the loop and do connect to all found servers. Or maybe you know that your solution will always find only one server, for example, a classroom solution.

Now the question is how to connect to Server having its description string from Bonjour. It is very simple. You need just pass this string into the constructor of VConnection class as inHost parameter. Valentina Client will do all rest job itself.