From a66c3eed27b5579cb6f4e8f17ca8fc76e4ca842d Mon Sep 17 00:00:00 2001 From: Sergey Abramchuk Date: Mon, 1 May 2017 12:29:28 +0300 Subject: [PATCH] Resume vpn client --- OpenVPN Adapter/OpenVPNAdapter+Public.h | 8 +++++++- OpenVPN Adapter/OpenVPNAdapter.mm | 4 ++++ 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/OpenVPN Adapter/OpenVPNAdapter+Public.h b/OpenVPN Adapter/OpenVPNAdapter+Public.h index e801f34..e767f09 100644 --- a/OpenVPN Adapter/OpenVPNAdapter+Public.h +++ b/OpenVPN Adapter/OpenVPNAdapter+Public.h @@ -167,7 +167,13 @@ NS_SWIFT_NAME(provide(credentials:)); @param pauseReason <#reason description#> */ -- (void)pauseWithReason:(nullable NSString *)pauseReason; +- (void)pauseWithReason:(nullable NSString *)pauseReason +NS_SWIFT_NAME(pause(reason:)); + +/** + Resume the client after it has been paused + */ +- (void)resume; /** Close connection with the VPN server diff --git a/OpenVPN Adapter/OpenVPNAdapter.mm b/OpenVPN Adapter/OpenVPNAdapter.mm index acb4fc5..54e95b7 100644 --- a/OpenVPN Adapter/OpenVPNAdapter.mm +++ b/OpenVPN Adapter/OpenVPNAdapter.mm @@ -232,6 +232,10 @@ NSString * const OpenVPNAdapterErrorEventKey = @"me.ss-abramchuk.openvpn-adapter self.vpnClient->pause(reason); } +- (void)resume { + self.vpnClient->resume(); +} + - (void)disconnect { self.vpnClient->stop(); }