Refactor implementation of OpenVPNPacketFlowBridge class

This commit is contained in:
Sergey Abramchuk
2018-01-16 17:00:41 +03:00
parent fa2417c4af
commit 3eba7cc615
2 changed files with 115 additions and 107 deletions
+8 -4
View File
@@ -3,21 +3,25 @@
// OpenVPN Adapter
//
// Created by Jonathan Downing on 12/10/2017.
// Modified by Sergey Abramchuk on 15/01/2018.
//
#import <Foundation/Foundation.h>
NS_ASSUME_NONNULL_BEGIN
@class NEPacketTunnelFlow;
@protocol OpenVPNAdapterPacketFlow;
@interface OpenVPNPacketFlowBridge : NSObject
@interface OpenVPNPacketFlowBridge: NSObject
@property (nonatomic, readonly) CFSocketNativeHandle socketHandle;
@property (nonatomic, readonly) CFSocketRef openVPNSocket;
@property (nonatomic, readonly) CFSocketRef packetFlowSocket;
- (instancetype)init NS_UNAVAILABLE;
- (nullable instancetype)initWithPacketFlow:(id<OpenVPNAdapterPacketFlow>)packetFlow NS_DESIGNATED_INITIALIZER;
- (nullable instancetype)initWithPacketFlow:(NEPacketTunnelFlow *)packetFlow NS_DESIGNATED_INITIALIZER;
- (BOOL)configureSocketsWithError:(NSError **)error;
- (void)startReading;
@end