Hi there, We use PacketTunnelProvider to build a SSL tunnel successfully. However, I have two problems currently.
1. The sleepWithCompletionHandler seems not work at all. My code looks like the following: class PacketTunnelProvider: NEPacketTunnelProvider, someDelegate { … override func sleepWithCompletionHandler(completionHandler: () -> Void) { // Add code here to get ready to sleep. NSLog("SLEEP SLEEP SLEEEEEEEEP") self.stopTunnelWithReason(.IdleTimeout, completionHandler: completionHandler) } } But I never saw this function be called, no matter I setup break point or check the console log. And I do had setup self.targetManager.protocolConfiguration?.disconnectOnSleep value to true, it can also reflect on the GUI to prove the value is being set into the field correctly. Any suggestion about this? 2. I can not detect the connection is drop or not. Is it possible to use some kind of timer (like NSTimer) in Network extension code? without timer, don’t know when to check the connection state. NSTimer needs to work with Runloop, the extension code can also use it? Any suggestion? cheers, Kevin
signature.asc
Description: Message signed with OpenPGP using GPGMail
_______________________________________________ Do not post admin requests to the list. They will be ignored. Macnetworkprog mailing list (Macnetworkprog@lists.apple.com) Help/Unsubscribe/Update your Subscription: https://lists.apple.com/mailman/options/macnetworkprog/archive%40mail-archive.com This email sent to arch...@mail-archive.com