Reconnect vpn client

This commit is contained in:
Sergey Abramchuk
2017-05-01 12:48:24 +03:00
parent a66c3eed27
commit 1464cd1ce9
2 changed files with 12 additions and 0 deletions

View File

@@ -175,6 +175,14 @@ NS_SWIFT_NAME(pause(reason:));
*/
- (void)resume;
/**
Do a disconnect/reconnect cycle after given amount of seconds from now
@param interval <#interval description#>
*/
- (void)reconnectAfterTimeInterval:(NSInteger)interval
NS_SWIFT_NAME(reconnect(interval:));
/**
Close connection with the VPN server
*/

View File

@@ -236,6 +236,10 @@ NSString * const OpenVPNAdapterErrorEventKey = @"me.ss-abramchuk.openvpn-adapter
self.vpnClient->resume();
}
- (void)reconnectAfterTimeInterval:(NSInteger)interval {
self.vpnClient->reconnect(interval);
}
- (void)disconnect {
self.vpnClient->stop();
}