mirror of
https://github.com/Swiftgram/Telegram-iOS.git
synced 2025-06-16 05:55:20 +00:00
32 lines
688 B
Objective-C
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
|