AWSKSReachableOperation Class Reference
Inherits from | NSObject |
---|---|
Declared in | AWSKSReachability.h AWSKSReachability.m |
Overview
A one-time operation to perform as soon as a host is deemed reachable. The operation will only be performed once, regardless of how many times a host becomes reachable.
+ operationWithHost:allowWWAN:onReachabilityAchieved:
Constructor. Returns nil if an initialization error occurs.
+ (AWSKSReachableOperation *)operationWithHost:(NSString *)hostname allowWWAN:(BOOL)allowWWAN onReachabilityAchieved:(dispatch_block_t)onReachabilityAchieved
Parameters
hostname |
The name or IP address of the host to monitor. If nil or empty string, check reachability to the internet in general. If hostname is a URL string, it will use the host portion. |
---|---|
allowWWAN |
If NO, a WWAN-only connection is not enough to trigger this operation. |
onReachabilityAchieved |
Invoke when the host becomes reachable. This will be invoked ONE TIME ONLY, no matter how many times reachability changes. Block will be invoked on the main thread. |
Declared In
AWSKSReachability.h
+ operationWithReachability:allowWWAN:onReachabilityAchieved:
Constructor. Returns nil if an initialization error occurs.
+ (AWSKSReachableOperation *)operationWithReachability:(AWSKSReachability *)reachability allowWWAN:(BOOL)allowWWAN onReachabilityAchieved:(dispatch_block_t)onReachabilityAchieved
Parameters
reachability |
A reachability instance. Note: This object will overwrite the onReachabilityChanged property. |
---|---|
allowWWAN |
If NO, a WWAN-only connection is not enough to trigger this operation. |
onReachabilityAchieved |
Invoke when the host becomes reachable. This will be invoked ONE TIME ONLY, no matter how many times reachability changes. Block will be invoked on the main thread. |
Declared In
AWSKSReachability.h
– initWithHost:allowWWAN:onReachabilityAchieved:
Initializer. Returns nil if an initialization error occurs.
- (id)initWithHost:(NSString *)hostname allowWWAN:(BOOL)allowWWAN onReachabilityAchieved:(dispatch_block_t)onReachabilityAchieved
Parameters
hostname |
The name or IP address of the host to monitor. If nil or empty string, check reachability to the internet in general. If hostname is a URL string, it will use the host portion. |
---|---|
allowWWAN |
If NO, a WWAN-only connection is not enough to trigger this operation. |
onReachabilityAchieved |
Invoke when the host becomes reachable. This will be invoked ONE TIME ONLY, no matter how many times reachability changes. Block will be invoked on the main thread. |
Declared In
AWSKSReachability.h
– initWithReachability:allowWWAN:onReachabilityAchieved:
Initializer. Returns nil if an initialization error occurs.
- (id)initWithReachability:(AWSKSReachability *)reachability allowWWAN:(BOOL)allowWWAN onReachabilityAchieved:(dispatch_block_t)onReachabilityAchieved
Parameters
reachability |
A reachability instance. Note: This object will overwrite the onReachabilityChanged property. |
---|---|
allowWWAN |
If NO, a WWAN-only connection is not enough to trigger this operation. |
onReachabilityAchieved |
Invoke when the host becomes reachable. This will be invoked ONE TIME ONLY, no matter how many times reachability changes. Block will be invoked on the main thread. |
Declared In
AWSKSReachability.h
reachability
Access to internal reachability instance. Use this to monitor for errors.
@property (nonatomic, readonly, retain) AWSKSReachability *reachability
Declared In
AWSKSReachability.h