Instance Method


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


func createTCPConnection(_ endpoint: NWEndpoint) -> NWTCPConnection



The remote host and port of the connection.

Return Value

A TCP connection that will connect over the network associated with the command.


The TCP connection is started automatically. Use KVO to observe the connection’s state property to be notified when the connection is established or fails.

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 createUDPSession(NWEndpoint) -> NWUDPSession

Create a new UDP session 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