Topics
All
MacOS
(Only)
Windows
(Only)
Linux
(Only, Not)
iOS
(Only, Not)
Components
Crossplatform Mac & Win
Server
Client
Old
Deprecated
Guides
Examples
Videos
New in version:
11.0
11.1
11.2
11.3
11.4
11.5
12.0
12.1
12.2
12.3
Statistic
FMM
Blog
Bonjour.Register
Register a service.
Component | Version | macOS | Windows | Linux | Server | iOS SDK | License |
Bonjour | 8.4 | ✅ Yes | ✅ Yes | ❌ No | ✅ Yes, on macOS and Windows | ✅ Yes | Paid |
MBS( "Bonjour.Register"; Name; Type; Domain; Host; Port ) More
Parameters
Parameter | Description | Example |
---|---|---|
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.
