Contents

connecting(to:from:)

Subscribes to the provided service over Wi-Fi, providing browse results for connecting to the specified paired devices if available.

Declaration

static func connecting(to pairedDevices: WASubscriberBrowser.Devices, from mySubscribingService: WASubscribableService) -> WASubscriberBrowser.Action

Parameters

  • pairedDevices:

    The devices to connect to. The browser isn’t activated if no devices are specified.

  • mySubscribingService:

    The service to discover.

Return Value

A new Action configuring this operation.

Discussion

When subscribing, the NetworkBrowser provides a WAEndpoint for each discovered paired device, and the app can then create a NetworkConnection object to connect to each. Data path parameters including the WAPerformanceMode are set when creating the connection, using WAParameters written into the NWParameters for the NetworkConnection.