Create a UDP session through the current tunnel.
SDKs
- iOS 9.0+
- macOS 10.11+
- Mac Catalyst 13.0+
Framework
- Network
Extension
Declaration
func createUDPSessionThroughTunnel(to remoteEndpoint: NWEndpoint, from localEndpoint: NWHost Endpoint?) -> NWUDPSession
Parameters
remoteEndpoint
The remote endpoint to send UDP datagrams to.
fromEndpoint
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.
Discussion
Use this method to create a UDP session to an endpoint inside the private network.