Skip to main content
Version: Next

Taro.onLocalServiceFound(callback)

Listens on the mDNS service discovery event.

Reference

Type

(callback: Callback) => void

Parameters

Callback

The callback function for the mDNS service discovery event.

(result: CallbackResult) => void
PropertyType
resultCallbackResult

CallbackResult

PropertyTypeDescription
ipstringService IP address
portnumberService port
serviceNamestringService name
serviceTypestringService type

API Support

APIWeChat Mini-ProgramH5React Native
Taro.onLocalServiceFound✔️