Contents

wifiAware(_:)

Configure Wi-Fi Aware properties on an NetworkConnection

Declaration

func wifiAware(_ configurator: (inout WAParameters) -> Void) -> NWParametersBuilder<Top, repeat each P>

Parameters

  • configurator:

    The function that will apply the desired WAParameters to the network parameters.

Return Value

The updated parameters, with the configured Wi-Fi Aware parameters applied.

Discussion

If not previously set, parameters will have WAParameters/defaults applied initially.

Example:

let connection = NetworkConnection(to: endpoint, using: .parameters {
	UDP()
}.wifiAware {
	$0 = .defaults
}