RTKCommunicationDataSender.h
1006 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
//
// RTKCommunicationDataSender.h
// RTKLEFoundation
//
// Created by jerome_gu on 2020/1/21.
// Copyright © 2020 jerome_gu. All rights reserved.
//
#import <Foundation/Foundation.h>
#ifdef RTK_SDK_IS_STATIC_LIBRARY
#import "RTKLEGeneralDefines.h"
#import "RTKPackageCommunication.h"
#else
#import <RTKLEFoundation/RTKLEGeneralDefines.h>
#import <RTKLEFoundation/RTKPackageCommunication.h>
#endif
NS_ASSUME_NONNULL_BEGIN
@interface RTKCommunicationDataSender : NSObject {
RTKLECompletionBlock _completionHandler;
}
- (instancetype)initWithCommunication:(RTKPackageCommunication *)communication MTU:(NSUInteger)size;
@property (nonatomic, readonly) RTKPackageCommunication *communication;
@property (nonatomic, readonly) NSUInteger mtu;
@property (nonatomic, readonly) BOOL inProgress;
- (void)sendData:(NSData *)data withCompletionHandler:(RTKLECompletionBlock)handler;
@property (nonatomic, readonly) NSData *sendingData;
- (void)cancelInProgressSending;
@end
NS_ASSUME_NONNULL_END