Contents

WAPublisherListener

Configures a network listener to publish a service over Wi-Fi Aware and accept incoming connections from paired devices.

Declaration

struct WAPublisherListener

Overview

Devices can publish services for other Wi-Fi Aware devices to use by creating a NetworkListener object from the Network framework, and passing in a .wifiAware() instruction indicating the WAPublishableService to provide, and the set of WAPairedDevice that can connect to the service. The code below configures the NetworkListener as a Wi-Fi Aware publisher by passing in a .wifiAware() instruction:

NetworkListener(for: .wifiAware( .connecting(to:service,  from:.selected(devices)) ) )

Topics

Configuring a listener

Creating publisher implementation details

See Also

Publisher