cancelTunnelWithError(_:)
Stop the network tunnel from the Packet Tunnel Provider.
Declaration
func cancelTunnelWithError(_ error: (any Error)?)Parameters
- error:
An Nserror object containing the error that caused the tunnel to be stopped. The domain and code of this NSError object is defined by the caller.
Discussion
The Packet Tunnel Provider should call this method when an unrecoverable error occurs, such as the tunnel server going down or the VPN authentication session expiring.