PLVVodMediaReachability
Objective-C
@interface PLVVodMediaReachability : NSObject
/*!
* create instance
*/
+ (instancetype)sharedReachability;
/*!
* Use to check the reachability of a given host name.
*/
+ (instancetype)reachabilityWithHostName:(NSString *)hostName;
/*!
* Use to check the reachability of a given IP address.
*/
+ (instancetype)reachabilityWithAddress:(const struct sockaddr *)hostAddress;
/*!
* Checks whether the default route is available. Should be used by applications that do not connect to a particular host.
*/
+ (instancetype)reachabilityForInternetConnection;
#pragma mark reachabilityForLocalWiFi
//reachabilityForLocalWiFi has been removed from the sample. See ReadMe.md for more information.
//+ (instancetype)reachabilityForLocalWiFi;
/*!
* Start listening for reachability notifications on the current run loop.
*/
- (BOOL)startNotifier;
- (void)stopNotifier;
/*
* 返回当前网络状态
*/
- (PLVVodMediaNetworkStatus)currentReachabilityStatus;
/*!
* WWAN may be available, but not active until a connection has been established. WiFi may require a connection for VPN on Demand.
*/
- (BOOL)connectionRequired;
/*
* 当前网络是否可用
*/
- (BOOL)notReachability;
@end
Swift
class PLVVodMediaReachability : NSObject
Undocumented
-
Undocumented
Declaration
Objective-C
+ (instancetype)sharedReachability;
Swift
class func shared() -> Self!
-
Undocumented
Declaration
Objective-C
+ (instancetype)reachabilityWithHostName:(NSString *)hostName;
Swift
convenience init!(hostName: String!)
-
Undocumented
Declaration
Objective-C
+ (instancetype)reachabilityForInternetConnection;
Swift
class func forInternetConnection() -> Self!
-
Undocumented
Declaration
Objective-C
- (BOOL)startNotifier;
Swift
func startNotifier() -> Bool
-
Undocumented
Declaration
Objective-C
- (void)stopNotifier;
Swift
func stopNotifier()
-
Undocumented
Declaration
Objective-C
- (PLVVodMediaNetworkStatus)currentReachabilityStatus;
Swift
func currentReachabilityStatus() -> PLVVodMediaNetworkStatus
-
Undocumented
Declaration
Objective-C
- (BOOL)connectionRequired;
Swift
func connectionRequired() -> Bool
-
Undocumented
Declaration
Objective-C
- (BOOL)notReachability;
Swift
func notReachability() -> Bool