In the simpleTunnel application presented by apple, the container application and the packet tunnel provider use IPC for communication.
When you enable the startVPNTunnel () toggle button , the API will be called, and the OS will launch the packet tunnel provider, which, in turn, calls the overridden startTunnelWithOptions () method . Here we begin our connection to the VPN server. startTunnelWithOptions , in turn, calls startTunnel , which calls createTCPConnectionToEndpoint ( connection = provider.createTCPConnectionToEndpoint (endpoint, enableTLS: false, TLSParameters: nil, delegate: zero) )
How do we get the socket descriptor from this connection (so that I can use it in another C ++ library that sends SSL and other user messages)? (connnection is an instance of the NWTCPConnection class , but NWTCPConnection does not seem to contain a socket handle)
source
share