QNDns.h 749 B

12345678910111213141516171819202122232425262728293031323334353637
  1. //
  2. // QNDns.h
  3. // QnDNS
  4. //
  5. // Created by yangsen on 2020/3/26.
  6. // Copyright © 2020 com.qiniu. All rights reserved.
  7. //
  8. #import <Foundation/Foundation.h>
  9. NS_ASSUME_NONNULL_BEGIN
  10. @protocol QNInetAddressDelegate <NSObject>
  11. /// 域名
  12. @property(nonatomic, copy, readonly)NSString *hostValue;
  13. /// 地址IP信息
  14. @property(nonatomic, copy, readonly)NSString *ipValue;
  15. /// ip有效时间 单位:秒
  16. @property(nonatomic, strong, readonly)NSNumber *ttlValue;
  17. /// 解析到host时的时间戳 单位:秒
  18. @property(nonatomic, strong, readonly)NSNumber *timestampValue;
  19. @end
  20. @protocol QNDnsDelegate <NSObject>
  21. /// 根据host获取解析结果
  22. - (NSArray < id <QNInetAddressDelegate> > *)lookup:(NSString *)host;
  23. @end
  24. NS_ASSUME_NONNULL_END