startDiscovery function

Future<Discovery> startDiscovery(
  1. String serviceType, {
  2. bool autoResolve = true,
  3. IpLookupType ipLookupType = IpLookupType.none,
})

Starts a discovery for the specified service type.

The Android documentation proposes resolving services just before connecting to them, but in many use cases the service host will be cruicial to decide on a service. For this reason, autoResolve is on by default and discovered services will be fully resolved.

Implementation

Future<Discovery> startDiscovery(String serviceType,
        {bool autoResolve = true,
        IpLookupType ipLookupType = IpLookupType.none}) async =>
    NsdPlatformInterface.instance.startDiscovery(serviceType,
        autoResolve: autoResolve, ipLookupType: ipLookupType);