mergBonjourRegisterService

Typecommand
DictionaryLCS
LibraryLiveCode Script
Syntax
mergBonjourRegisterService <pType>, <pPort>, [<pDomain>], [<pName>]
Associationsmergbonjour
Summary

Publish a bonjour service

Introduced8.0
OSios, mac
Platformsdesktop, mobile
Parameters
NameTypeDescription
pType

The pType parameter must contain both the service type and transport layer information. To ensure that the mDNS responder searches for services, rather than hosts, make sure to prefix both the service name and transport layer name with an underscore character (‰??_‰??). For example, to search for an HTTP service on TCP, you would use the type string ‰??_http._tcp.‰??. Note that the period character at the end is required.

pPort

The port on which the service is published.

pDomain

(optional with "" default) The pDomain parameter can be an explicit domain name, the generic local domain "local." (note trailing period, which indicates an absolute name), or the empty string (""), which indicates the default registration domains. Usually, you pass in an empty string.

pName

(optional with "" default) The name by which the service is identified to the network. The name must be unique. By using the default empty string ("") the system will automatically advertise the service under the device name eg ("Monte Goulding's iPhone").

Values
NameTypeDescription
return

a pointer to the service in memory. Use this pointer with mergBonjourStopService to end the service. If 0 is returned the service was not able to be registered. As the service will be stopped when it's released from memory if your app doesn't need to ever stop a service once started then there's no need to retain this pointer as the service will automatically stop when the app shuts down.

Description

This command uses wait with messages style script blocking.

Tagsexternals