title: Taro.onLocalServiceFound(callback)
sidebar_label: onLocalServiceFound
Listens on the mDNS service discovery event.
Type
(callback: Callback) => void
Parameters
Callback
The callback function for the mDNS service discovery event.
(result: CallbackResult) => void
| Property | Type |
|---|---|
| result | CallbackResult |
CallbackResult
| Property | Type | Description |
|---|---|---|
| ip | string |
Service IP address |
| port | number |
Service port |
| serviceName | string |
Service name |
| serviceType | string |
Service type |
API Support
| API | WeChat Mini-Program | H5 | React Native |
|---|---|---|---|
| Taro.onLocalServiceFound | ✔️ |
