QNInetAddress.h 766 B

1234567891011121314151617181920212223242526272829303132333435
  1. //
  2. // QNInetAddress.h
  3. // QiniuSDK
  4. //
  5. // Created by 杨森 on 2020/7/27.
  6. // Copyright © 2020 Qiniu. All rights reserved.
  7. //
  8. #import "QNDns.h"
  9. NS_ASSUME_NONNULL_BEGIN
  10. @interface QNInetAddress : NSObject <QNInetAddressDelegate>
  11. @property(nonatomic, copy)NSString *hostValue;
  12. @property(nonatomic, copy)NSString *ipValue;
  13. @property(nonatomic, strong)NSNumber *ttlValue;
  14. @property(nonatomic, strong)NSNumber *timestampValue;
  15. /// 构造方法 addressData为json String / Dictionary / Data / 遵循 QNInetAddressDelegate的实例
  16. + (instancetype)inetAddress:(id)addressInfo;
  17. /// 是否有效,根据时间戳判断
  18. - (BOOL)isValid;
  19. /// 对象转json
  20. - (NSString *)toJsonInfo;
  21. /// 对象转字典
  22. - (NSDictionary *)toDictionary;
  23. @end
  24. NS_ASSUME_NONNULL_END