Map Doc  1.0
iOS-引擎SDK-开放平台
MBReachability.h
浏览该文件的文档.
1 /*
2  Copyright (C) 2016 Apple Inc. All Rights Reserved.
3  See LICENSE.txt for this sample’s licensing information
4 
5  Abstract:
6  Basic demonstration of how to use the SystemConfiguration Reachablity APIs.
7 
8  https://developer.apple.com/library/content/samplecode/Reachability/Introduction/Intro.html
9 
10  */
11 
12 #import <Foundation/Foundation.h>
13 #import <SystemConfiguration/SystemConfiguration.h>
14 #import <netinet/in.h>
15 
16 
17 typedef NS_ENUM(NSInteger, MBNetworkStatus) {
21 };
22 
23 #pragma mark IPv6 Support
24 //Reachability fully support IPv6. For full details, see ReadMe.md.
25 
26 
27 extern NSString *kMBReachabilityChangedNotification;
28 
29 
30 @interface MBReachability : NSObject
31 
35 + (instancetype)reachabilityWithHostName:(NSString *)hostName;
36 
40 + (instancetype)reachabilityWithAddress:(const struct sockaddr *)hostAddress;
41 
45 + (instancetype)reachabilityForInternetConnection;
46 
47 
48 #pragma mark reachabilityForLocalWiFi
49 //reachabilityForLocalWiFi has been removed from the sample. See ReadMe.md for more information.
50 //+ (instancetype)reachabilityForLocalWiFi;
51 
55 - (BOOL)startNotifier;
56 - (void)stopNotifier;
57 
59 
63 - (BOOL)connectionRequired;
64 
65 @end
66 
67 
Definition: MBReachability.h:20
MBNetworkStatus currentReachabilityStatus()
BOOL connectionRequired()
NSString * kMBReachabilityChangedNotification
Definition: MBReachability.h:30
Definition: MBReachability.h:18
MBNetworkStatus
Definition: MBReachability.h:17
instancetype reachabilityForInternetConnection()
Definition: MBReachability.h:19