Topics   All   Mac OS X (Only)   Windows (Only)   Linux (Only, Not)   iOS (Only, Not)  
Components   Crossplatform Mac & Win   Server   Client   Old   Guides   Examples
New in version: 7.3   7.4   7.5   8.0   8.1   8.2   8.3   8.4   8.5   8.6    Statistic  

Bonjour.Register

Register a service.

Component Version macOS Windows Server FileMaker Cloud FileMaker iOS SDK
Bonjour 8.4 Yes Yes Yes No Yes
MBS( "Bonjour.Register"; Name; Type; Domain; Host; Port )   More

Parameters

Parameter Description Example value
Name If non-empty, specifies the service name to be registered.
Most applications will not specify a name, in which case the computer name is used
If a name is specified, it must be 1-63 bytes of UTF-8 text.
If the name is longer than 63 bytes it will be automatically truncated to a legal length.
Type The service type followed by the protocol, separated by a dot (e.g. "_ftp._tcp"). The service type must be an underscore, followed by 1-14 characters, which may be letters, digits, or hyphens.
The transport protocol must be "_tcp" or "_udp". New service types should be registered at http://www.dns-sd.org/ServiceTypes.html.
"_test._tcp"
Domain If non-empty, specifies the domain on which to advertise the service.
Most applications will not specify a domain, instead automatically registering in the default domain(s).
Host If non-empty, specifies the SRV target host name.
Most applications will not specify a host, instead automatically using the machine'sdefault host name(s).
Port The port, in network byte order, on which the service accepts connections.
Pass 0 for a "placeholder" service (i.e. a service that will not be discovered by browsing, but will cause a name conflict if another client tries to register that same name). Most clients will not use placeholder services.
1234

Result

Returns OK or error.

Description

Register a service.
This service is discovered via Bonjour.Browse function.

Examples

Register test service:

MBS( "Bonjour.Register"; "Test"; "_test._tcp"; ""; ""; 1234 )

See also

Created 31st July 2018, last changed 31st July 2018


Bonjour.JSON   -   Bonjour.RegisteredName

Feedback: Report problem or ask question.




Links
MBS Xojo tutorial videos