// // DataPath.h // TunnelKit // // Created by Davide De Rosa on 3/2/17. // Copyright © 2018 London Trust Media. All rights reserved. // #import @protocol DataPathEncrypter; @protocol DataPathDecrypter; // send/receive should be mutually thread-safe @interface DataPath : NSObject @property (nonatomic, assign) uint32_t maxPacketId; - (nonnull instancetype)initWithEncrypter:(nonnull id)encrypter decrypter:(nonnull id)decrypter maxPackets:(NSInteger)maxPackets usesReplayProtection:(BOOL)usesReplayProtection; - (void)setPeerId:(uint32_t)peerId; // 24-bit, discard most significant byte - (void)setLZOFraming:(BOOL)LZOFraming;// DEPRECATED_ATTRIBUTE; - (NSArray *)encryptPackets:(nonnull NSArray *)packets key:(uint8_t)key error:(NSError **)error; - (NSArray *)decryptPackets:(nonnull NSArray *)packets keepAlive:(nullable bool *)keepAlive error:(NSError **)error; @end