Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

This object is used to advertise services running on a BrightSign player to other devices on the network. The current implementation supports advertising via mDNS (which is part of zeroconf via Bonjour™).

Tip

Tip

To discover a player advertising on the local network, use the roNetworkDiscoveryobject.

Object creation: The roNetworkAdvertisement object is created with an associative array of network parameters and arbitrary text information.

Code Block
CreateObject("roNetworkAdvertisement", advertisement As roAssociativeArray) As Object

The roAssociativeArray can contain the following keys:

  • name: The service name. This should be a readable string such as "Remote BrightSign Widget Service."

  • type: The service type. This should be a service from the definitive list, formatted in the following manner: "_service._protocol" (for example, "_http._tcp").

  • port: The port number on which the service runs.

  • _<name>: An arbitrary text key. The value can be used to provide additional, optional data to clients (serial number, IP address, etc.). The key must be preceded by an underscore to avoid name conflicts within the associative array; the underscore will be removed before the record is registered with mDNS.

Once the object is created, advertising starts immediately and continues until the object is destroyed (i.e. when it becomes unreferenced).

There are no interfaces on the roNetworkAdvertisement object.

Example
Code Block
mp = CreateObject("roMessagePort")
di = CreateObject("roDeviceInfo")
props = { name: "My Hoopy Service", type: "_http._tcp", port: 8080, _serial: di.GetDeviceUniqueId() }
advert = CreateObject("roNetworkAdvertisement", props)

wait(600000, mp)
advert = invalid ' Stop advertising
Panel
borderColor#3D3D3D
bgColor#F4F4F4
titleColor#3D3D3D
borderWidth0
titleBGColor#3D3D3D
borderStylesolid

ON THIS PAGE

Table of Contents
indent20px