| Platform | Since |
|---|---|
| iPhone | 1.2.0 |
| iPad | 1.2.0 |
A browser for the discovery and retrieval of Bonjour services available on the network.
Use the Titanium.Network.createBonjourBrowser method to create a BonjourBrowser instance.
If your application publishes Bonjour services itself, that service will be discovered
by the browser if necessary; be prepared to perform a check if you do not want to list
local services as available. Bonjour service browsing is an asynchronous operation,
meaning that you should be extremely careful when caching values from the services
property returned by the updatedServices event. In particular, if you maintain a
local copy of available services and a user tries to connect to one, you should be prepared
to handle failures gracefully; the next updatedServices event should provide the new
services list, but you should not rely on it being delivered before user input. When
a window which uses Bonjour browsing is closed, if you do not want to continue searching,
you must call the stop() method.
| Name | Summary |
|---|---|
| addEventListener |
Adds the specified callback as an event listener for the named event. |
| fireEvent |
Fires a synthesized event to any registered listeners. |
| getDomain |
Gets the value of the domain property. |
| getIsSearching |
Gets the value of the isSearching property. |
| getServiceType |
Gets the value of the serviceType property. |
| removeEventListener |
Removes the specified callback as an event listener for the named event. |
| search |
Conduct a search for Bonjour services matching the type and domain specified during creation |
| setDomain |
Sets the value of the domain property. |
| setIsSearching |
Sets the value of the isSearching property. |
| setServiceType |
Sets the value of the serviceType property. |
| stopSearch |
Halt an ongoing search |
| Name | Type | Summary |
|---|---|---|
| domain | String |
The domain the browser is searching in |
| isSearching | Boolean |
Whether or not the browser is currently searching |
| serviceType | String |
The type of the service the browser searches for |
| Name | Summary |
|---|---|
| updatedServices |
Fired when the discovered services list is updated |