zeroconf.browse()

Type Function
Return value Userdata
Revision Release 2024.3703
Keywords ZeroConf, network, browse
See also zeroconf.stopBrowse()
zeroconf.stopBrowseAll()
zeroconf.*

Overview

Starts looking for services of a specific type over the network. Whenever a service is found (or lost), a PluginZeroConfEvent event will be invoked with a phase of "found" or "lost".

If browsing is started successfully, a browser ID will be returned. This can be passed to zeroconf.stopBrowse() to stop looking for services.

Gotchas

This function returns nil in case of failure.

Syntax

zeroconf.browse( params )
params (required)

Table. Table containing parameters — see the next section for details.

Parameter Reference

type (optional)

String. The type of service to look for. This must start with an underscore (_) and end with a protocol separated by a dot. Valid protocol names are _tcp and _udp. The default type is _corona._tcp.

domain (optional)

String. Domain to browse for services. Default is "local". An empty string indicates all available domains. Omit this key unless you fully understand its purpose.