Files
waf-platform/HttpDNSSDK/sdk/ios/NewHttpDNS/Model/HttpdnsRequest.h
2026-03-05 02:44:43 +08:00

65 lines
2.5 KiB
Objective-C
Raw Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

//
// HttpdnsRequest.h
// NewHttpDNS
//
// Created by xuyecan on 2024/5/19.
// Copyright ツゥ 2024 trustapp.com. All rights reserved.
//
#import <Foundation/Foundation.h>
NS_ASSUME_NONNULL_BEGIN
#ifndef NewHTTPDNSQUERYIPTYPE
#define NewHTTPDNSQUERYIPTYPE
typedef enum {
NewHttpDNS_IPTypeV4 = 0, //ipv4
NewHttpDNS_IPTypeV6 = 1, //ipv6
NewHttpDNS_IPTypeV64 = 2, //ipv4 + ipv6
} NewHttpDNS_IPType;
typedef NS_OPTIONS(NSUInteger, HttpdnsQueryIPType) {
HttpdnsQueryIPTypeAuto NS_SWIFT_NAME(auto) = 0,
HttpdnsQueryIPTypeIpv4 = 1 << 0,
HttpdnsQueryIPTypeIpv6 = 1 << 1,
HttpdnsQueryIPTypeBoth = HttpdnsQueryIPTypeIpv4 | HttpdnsQueryIPTypeIpv6,
};
#endif
@interface HttpdnsRequest : NSObject
/// 髴€隕∬ァ」譫千噪蝓溷錐
@property (nonatomic, copy) NSString *host;
/// 隗」譫占カ<E58DA0>慮譌カ髣エ<E9ABA3>悟ッケ莠主酔豁・謗・蜿」<E89CBF>悟叉荳コ譛€螟ァ遲牙セ<E78999>慮髣エ<E9ABA3>悟ッケ莠主シよュ・謗・蜿」<E89CBF>悟叉荳コ譛€螟ァ遲牙セ<E78999>屓隹<E5B193>慮髣?
/// 鮟倩ョ、蛟?遘抵シ悟叙蛟シ蠢<EFBDBC>。サ蝨ィ0.5遘?- 5遘剃ケ矩<EFBDB9>?
@property (nonatomic, assign) double resolveTimeoutInSecond;
/// 譟・隸「IP邀サ蝙<EFBDBB>
/// 鮟倩ョ、荳コHttpdnsQueryIPTypeAuto<74>梧ュ、邀サ蝙倶ク具シ郡DK閾ウ蟆台シ夊ッキ豎りァ」譫進pv4蝨ー蝮€<E89DAE>瑚凶蛻、譁ュ蛻ー蠖灘燕鄂醍サ懃識蠅<E8AD98>髪謖pv6<76><EFBFBD>霑倅シ夊ッキ豎りァ」譫進pv6蝨ー蝮€
/// HttpdnsQueryIPTypeIpv4<76>悟宵隸キ豎りァ」譫進pv4
/// HttpdnsQueryIPTypeIpv6<76>悟宵隸キ豎りァ」譫進pv6
/// HttpdnsQueryIPTypeBoth<74>御ク咲ョ。蠖灘燕鄂醍サ懃識蠅<E8AD98>弍莉€荵茨シ御シ壼ー晁ッ募酔譌カ隸キ豎りァ」譫進pv4蝨ー蝮€蜥景pv6蝨ー蝮€<E89DAE>瑚ソ咏ァ咲畑豕包シ碁€壼クク髴€隕∵響蛻ー扈捺棡荵句錘閾ェ陦悟愛譁ュ鄂醍サ懃識蠅<E8AD98><E8A085>螳壻スソ逕ィ蜩ェ荳ェ扈捺<E68988>?
@property (nonatomic, assign) HttpdnsQueryIPType queryIpType;
/// SDNS蜿よ焚<E38288>碁宙蟇ケ霓ッ莉カ閾ェ螳壻ケ芽ァ」譫仙惻譎ッ菴ソ逕ィ
@property (nonatomic, copy, nullable) NSDictionary<NSString *, NSString *> *sdnsParams;
/// 郛灘ュ婁ey<65>碁宙蟇ケ霓ッ莉カ閾ェ螳壻ケ芽ァ」譫仙惻譎ッ菴ソ逕ィ
@property (nonatomic, copy, nullable) NSString *cacheKey;
/// 隸キ豎よ園螻樒噪雍ヲ蜿キID<49>檎畑莠主惠螟夊エヲ蜿キ蝨コ譎ッ荳句ョ壻ス榊ョ樔セ<E6A894>
@property (nonatomic, assign) NSInteger accountId;
- (instancetype)initWithHost:(NSString *)host queryIpType:(HttpdnsQueryIPType)queryIpType;
- (instancetype)initWithHost:(NSString *)host queryIpType:(HttpdnsQueryIPType)queryIpType sdnsParams:(nullable NSDictionary<NSString *, NSString *> *)sdnsParams cacheKey:(nullable NSString *)cacheKey;
- (instancetype)initWithHost:(NSString *)host queryIpType:(HttpdnsQueryIPType)queryIpType sdnsParams:(nullable NSDictionary<NSString *, NSString *> *)sdnsParams cacheKey:(nullable NSString *)cacheKey resolveTimeout:(double)timeoutInSecond;
@end
NS_ASSUME_NONNULL_END