Swiftgram/MTProtoKit/MTHttpWorkerBehaviour.h
2018-06-13 17:11:43 +03:00

30 lines
558 B
Objective-C

#import <Foundation/Foundation.h>
@class MTQueue;
@class MTHttpWorkerBehaviour;
@protocol MTHttpWorkerBehaviourDelegate <NSObject>
@optional
- (void)httpWorkerBehaviourAllowsNewWorkerCreation:(MTHttpWorkerBehaviour *)behaviour;
@end
@interface MTHttpWorkerBehaviour : NSObject
@property (nonatomic, weak) id<MTHttpWorkerBehaviourDelegate> delegate;
- (instancetype)initWithQueue:(MTQueue *)queue;
- (void)clearBackoff;
- (void)setWorkersNeeded;
- (void)workerConnected;
- (void)workerReceivedValidData;
- (void)workerDisconnectedWithError;
@end