Skip to content

Commit

Permalink
comments added
Browse files Browse the repository at this point in the history
  • Loading branch information
dustturtle committed Jun 28, 2018
1 parent fc628c4 commit 517dc58
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 8 deletions.
16 changes: 11 additions & 5 deletions RealReachability/RealReachability.h
Original file line number Diff line number Diff line change
@@ -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.
Expand Down Expand Up @@ -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
3 changes: 0 additions & 3 deletions RealReachability/RealReachability.m
Original file line number Diff line number Diff line change
Expand Up @@ -474,9 +474,6 @@ - (void)localConnectionHandler:(NSNotification *)notification
}
}

// TODO: 这里比较特别;最终决定采用提供一个外部调用方法;不提供kvo;整合应用内部的状态变化的通知提供到外部。
// 这样一个综合的策略来实现。 kvo不适合用在这里,只有get方法会操作数据(没有真正意义上的set)。
// 而如果获取用一个方法,而kvo又是另外一个的话又会很怪异.
- (BOOL)isVPNOn
{
BOOL flag = NO;
Expand Down

0 comments on commit 517dc58

Please sign in to comment.