Swiftgram/submodules/MtProtoKit/Sources/MTTcpConnectionBehaviour.h
2020-02-20 01:37:54 +04:00

32 lines
688 B
Objective-C

@class MTQueue;
@class MTTcpConnectionBehaviour;
#import <Foundation/Foundation.h>
@protocol MTTcpConnectionBehaviourDelegate <NSObject>
@optional
- (void)tcpConnectionBehaviourRequestsReconnection:(MTTcpConnectionBehaviour *)behaviour error:(bool)error;
@end
@interface MTTcpConnectionBehaviour : NSObject
@property (nonatomic, weak) id<MTTcpConnectionBehaviourDelegate> delegate;
@property (nonatomic, strong, readonly) MTQueue *queue;
@property (nonatomic) bool needsReconnection;
- (instancetype)initWithQueue:(MTQueue *)queue;
- (void)requestConnection;
- (void)connectionOpened;
- (void)connectionValidDataReceived;
- (void)connectionClosed;
- (void)clearBackoff;
@end