0.0.1 • Published 11 months ago

capacitor-community-smdns v0.0.1

Weekly downloads
-
License
Mozilla Public Li...
Repository
github
Last release
11 months ago

capacitor-community-smdns

simple mdns

Currently only works on android.

Hint

You may not be able to get the host and port. It is not clear to me what is going on.

My suggestion is to use the server name to pass the information.

Install

npm install capacitor-community-smdns
npx cap sync

API

discoverServices(...)

discoverServices(type: string, cb: DiscoverServicesCbArgs) => Promise<CallbackId>
ParamType
typestring
cbDiscoverServicesCbArgs

Returns: Promise<string>


Type Aliases

DiscoverServicesCbArgs

{ onServiceFound?: (name: string, host?: string, port?: number) => void; onServiceLost?: (name: string, host?: string, port?: number) => void; }

CallbackId

string

0.0.1

11 months ago