Instance Method


Create a UDP session through the current tunnel.


func createUDPSessionThroughTunnel(to remoteEndpoint: NWEndpoint, from localEndpoint: NWHostEndpoint?) -> NWUDPSession



The remote endpoint to send UDP datagrams to.


The local endpoint to bind the UDP session to. If nil, the UDP session will be bound to an ephemeral port on the virtual interface.


Use this method to create a UDP session to an endpoint inside the private network.

See Also

Creating Network Connections Through the Tunnel

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