From 517dc58485184793c1436e78aeca472c9fc36c1b Mon Sep 17 00:00:00 2001 From: GuanZhenwei Date: Thu, 28 Jun 2018 18:41:52 +0800 Subject: [PATCH] comments added --- RealReachability/RealReachability.h | 16 +++++++++++----- RealReachability/RealReachability.m | 3 --- 2 files changed, 11 insertions(+), 8 deletions(-) diff --git a/RealReachability/RealReachability.h b/RealReachability/RealReachability.h index f83c7e4..c1cad1f 100755 --- a/RealReachability/RealReachability.h +++ b/RealReachability/RealReachability.h @@ -1,6 +1,6 @@ // // RealReachability.h -// Version 1.1.9 +// Version 1.3.0 // // Created by Dustturtle on 16/1/9. // Copyright (c) 2016 Dustturtle. All rights reserved. @@ -120,10 +120,16 @@ typedef NS_ENUM(NSInteger, WWANAccessType) { */ - (WWANAccessType)currentWWANtype; -// Sometimes people use VPN on the device. -// In this situation we need to ignore the ping error.(VPN usually do not support ICMP.) -// 目前内部使用轮询来实现,并没有监听,如果谁知道如何监听,请告诉我:)。 -// +/** + * Sometimes people use VPN on the device. + * In this situation we need to ignore the ping error. + * (VPN usually do not support ICMP.) + * + * @return current VPN status: YES->ON, NO->OFF. + * + * This method can be used to improve app's further network performance + * (different strategies for different WWAN types). + */ - (BOOL)isVPNOn; @end diff --git a/RealReachability/RealReachability.m b/RealReachability/RealReachability.m index 767ccd4..42059a0 100755 --- a/RealReachability/RealReachability.m +++ b/RealReachability/RealReachability.m @@ -474,9 +474,6 @@ - (void)localConnectionHandler:(NSNotification *)notification } } -// TODO: 这里比较特别;最终决定采用提供一个外部调用方法;不提供kvo;整合应用内部的状态变化的通知提供到外部。 -// 这样一个综合的策略来实现。 kvo不适合用在这里,只有get方法会操作数据(没有真正意义上的set)。 -// 而如果获取用一个方法,而kvo又是另外一个的话又会很怪异. - (BOOL)isVPNOn { BOOL flag = NO;