wireguard-apple/WireGuardNetworkExtension/PacketTunnelProvider.swift
Eli Young 86fa8e7186 Finish casing fix from Wireguard to WireGuard
This also removes from the project various duplicate file entries that
differed only in casing. Note that, if working with a case-insensitive
filesystem (as are generally used on macOS systems), it is recommended
to destroy the affected files in the working tree and check them out
again. Failure to do this will result in XCode recreating duplicate file
entries in the project.

Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
2018-06-22 13:50:16 -07:00

39 lines
1.1 KiB
Swift

//
// PacketTunnelProvider.swift
// WireGuardNetworkExtension
//
// Created by Jeroen Leenarts on 19-06-18.
// Copyright © 2018 WireGuard. All rights reserved.
//
import NetworkExtension
class PacketTunnelProvider: NEPacketTunnelProvider {
override func startTunnel(options: [String: NSObject]?, completionHandler: @escaping (Error?) -> Void) {
// Add code here to start the process of connecting the tunnel.
}
override func stopTunnel(with reason: NEProviderStopReason, completionHandler: @escaping () -> Void) {
// Add code here to start the process of stopping the tunnel.
completionHandler()
}
override func handleAppMessage(_ messageData: Data, completionHandler: ((Data?) -> Void)?) {
// Add code here to handle the message.
if let handler = completionHandler {
handler(messageData)
}
}
override func sleep(completionHandler: @escaping () -> Void) {
// Add code here to get ready to sleep.
completionHandler()
}
override func wake() {
// Add code here to wake up.
}
}