BBANetworkSilentDetectHelper.h
1.19 KB
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
42
43
//
// BBANetworkSilentDetectHelper.h
// BBAAPIRequestExt
//
// Created by baidu on 2020/7/9.
// Copyright © 2020 Baidu. All rights reserved.
//
// 静默探测支持的具体探测手段方法
#import <Foundation/Foundation.h>
#import "BBANetworkSilentDetectModel.h"
#import "BBAAPIRequest.h"
NS_ASSUME_NONNULL_BEGIN
@interface BBANetworkSilentDetectHelperModel : NSObject
@property (nonatomic, assign) BOOL shouldStopDetect; // 主逻辑是探测成功则不继续探测
@property (nonatomic, strong) NSDictionary *resDict;
@end
@interface BBANetworkSilentDetectHelper : NSObject
+ (BBANetworkSilentDetectHelperModel *)pingIp:(NSString *)ip;
+ (BBANetworkSilentDetectHelperModel *)tracerouteIp:(NSString *)ip;
+ (BBANetworkSilentDetectHelperModel *)tcpIp:(NSString *)ip port:(NSString *)port;
+ (BBANetworkSilentDetectHelperModel *)httpUrl:(NSString *)url method:(APIRequestMethod)method ip:(NSString *)ip actionId:(BBANetworkActionType)actionId;
/// localdns探测
/// @param host 域名
+ (BBANetworkSilentDetectHelperModel *)localdnsHost:(NSString *)host;
/// httpdns探测
/// @param host 域名
+ (BBANetworkSilentDetectHelperModel *)httpdnsHost:(NSString *)host;
@end
NS_ASSUME_NONNULL_END