Instance Method

createUDPSession(_:)

Create a new UDP session over the network associated with the command.

Declaration

func createUDPSession(_ endpoint: NWEndpoint) -> NWUDPSession

Parameters

endpoint

The remote host and port of the session.

Return Value

A UDP session that will connect over the network associated with the command.

Discussion

The UDP session is started automatically. Use KVO to observe the session’s state property to be notified when the session is ready to send and receive UDP datagrams. For information about KVO see Key-Value Observing Programming Guide.

See Also

Networking on the Hotspot Network

func bind(to: NEHotspotHelperCommand)

Binds a URL request to the network interface associated with the hotspot helper command instance.

func createTCPConnection(NWEndpoint) -> NWTCPConnection

Create a new TCP connection over the network associated with the command.

Beta Software

This documentation contains preliminary information about an API or technology in development. This information is subject to change, and software implemented according to this documentation should be tested with final operating system software.

Learn more about using Apple's beta software