MOBFNetworkFlowInfo.h 1.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263
  1. //
  2. // MOBFNetworkFlowInfo.h
  3. // MOBFoundation
  4. //
  5. // Created by fenghj on 15/12/17.
  6. // Copyright © 2015年 MOB. All rights reserved.
  7. //
  8. #import <Foundation/Foundation.h>
  9. /**
  10. * 网络流量信息
  11. */
  12. @interface MOBFNetworkFlowInfo : NSObject
  13. /**
  14. * 接收到的字节数
  15. */
  16. @property (nonatomic, readonly) NSUInteger receivedBytes;
  17. /**
  18. * 发送字节数
  19. */
  20. @property (nonatomic, readonly) NSUInteger sentBytes;
  21. /**
  22. * 最后的更新时间
  23. */
  24. @property (nonatomic, strong, readonly) NSDate *lastChangeTime;
  25. /**
  26. * WIFI下的接收字节数
  27. */
  28. @property (nonatomic, readonly) NSUInteger WIFIReceivedBytes;
  29. /**
  30. * WIFI下的发送字节数
  31. */
  32. @property (nonatomic, readonly) NSUInteger WIFISentBytes;
  33. /**
  34. * 蜂窝网络下的接收字节数
  35. */
  36. @property (nonatomic, readonly) NSUInteger WWANReceivedBytes;
  37. /**
  38. * 蜂窝网络下的发送字节数
  39. */
  40. @property (nonatomic, readonly) NSUInteger WWANSentBytes;
  41. /**
  42. * 获取网络流量信息共享实例
  43. *
  44. * @return 网络流量信息对象
  45. */
  46. + (MOBFNetworkFlowInfo *)sharedInstance;
  47. /**
  48. * 更新信息
  49. */
  50. - (void)update;
  51. @end