洛阳学员端
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

36 lines
892 B

9 months ago
  1. //
  2. // OSSURLRequestRetryHandler.h
  3. // AliyunOSSSDK
  4. //
  5. // Created by huaixu on 2018/1/22.
  6. // Copyright © 2018年 aliyun. All rights reserved.
  7. //
  8. #import <Foundation/Foundation.h>
  9. #import "OSSConstants.h"
  10. @class OSSNetworkingRequestDelegate;
  11. NS_ASSUME_NONNULL_BEGIN
  12. /**
  13. The retry handler interface
  14. */
  15. @interface OSSURLRequestRetryHandler : NSObject
  16. @property (nonatomic, assign) uint32_t maxRetryCount;
  17. + (instancetype)defaultRetryHandler;
  18. - (OSSNetworkingRetryType)shouldRetry:(uint32_t)currentRetryCount
  19. requestDelegate:(OSSNetworkingRequestDelegate *)delegate
  20. response:(NSHTTPURLResponse *)response
  21. error:(NSError *)error;
  22. - (NSTimeInterval)timeIntervalForRetry:(uint32_t)currentRetryCount
  23. retryType:(OSSNetworkingRetryType)retryType;
  24. @end
  25. NS_ASSUME_NONNULL_END