Instance Method

stopTunnelWithReason:completionHandler:

Stop the network tunnel.

Declaration

- (void)stopTunnelWithReason:(NEProviderStopReason)reason completionHandler:(void (^)(void))completionHandler;

Parameters

reason

An NEProviderStopReason code indicating why the tunnel is being stopped. Possible codes are listed in NEProvider.

completionHandler

A block that must be executed when the tunnel is fully stopped.

Discussion

This method is called by the system to stop the network tunnel.

NEPacketTunnelProvider subclasses must override this method.

Do not use this method to stop the tunnel from the Packet Tunnel Provider. Use cancelTunnelWithError: instead.

See Also

Managing the Tunnel Life Cycle

- cancelTunnelWithError:

Stop the network tunnel from the Packet Tunnel Provider.