TRCNetworkReachabilityManager is AFNetworkReachabilityManager copy from AFNetworking library. More...
Properties | |
TRCNetworkReachabilityStatus | networkReachabilityStatus |
The current network reachability status. More... | |
BOOL | reachable |
Whether or not the network is currently reachable. More... | |
BOOL | reachableViaWWAN |
Whether or not the network is currently reachable via WWAN. More... | |
BOOL | reachableViaWiFi |
Whether or not the network is currently reachable via WiFi. More... | |
Instance Methods | |
Starting & Stopping Reachability Monitoring | |
(void) | - startMonitoring |
Starts monitoring for changes in network reachability status. More... | |
(void) | - stopMonitoring |
Stops monitoring for changes in network reachability status. More... | |
Getting Localized Reachability Description | |
(NSString *) | - localizedNetworkReachabilityStatusString |
Returns a localized string representation of the current network reachability status. More... | |
Setting Network Reachability Change Callback | |
(void) | - setReachabilityStatusChangeBlock: |
Sets a callback to be executed when the network availability of the baseURL host changes. More... | |
Initialization | |
(instancetype) | + sharedManager |
Returns the shared network reachability manager. More... | |
(instancetype) | + managerForDomain: |
Creates and returns a network reachability manager for the specified domain. More... | |
(instancetype) | + managerForAddress: |
Creates and returns a network reachability manager for the socket address. More... | |
(instancetype) | - initWithReachability: |
Initializes an instance of a network reachability manager from the specified reachability object. More... | |
TRCNetworkReachabilityManager is AFNetworkReachabilityManager copy from AFNetworking library.
It has another prefix to avoid possible 'duplicate symbol' linker issue TRCNetworkReachabilityManager
monitors the reachability of domains, and addresses for both WWAN and WiFi network interfaces.
Reachability can be used to determine background information about why a network operation failed, or to trigger a network operation retrying when a connection is established. It should not be used to prevent a user from initiating a network request, as it's possible that an initial request may be required to establish reachability.
See Apple's Reachability Sample Code (https://developer.apple.com/library/ios/samplecode/reachability/)
TRCNetworkReachabilityManager
must be started with -startMonitoring
before reachability status can be determined.
|
readnonatomicassign |
The current network reachability status.
|
readnonatomicassign |
Whether or not the network is currently reachable.
|
readnonatomicassign |
Whether or not the network is currently reachable via WWAN.
|
readnonatomicassign |
Whether or not the network is currently reachable via WiFi.
+ (instancetype) sharedManager |
Returns the shared network reachability manager.
+ (instancetype) managerForDomain: | (NSString *) | domain |
Creates and returns a network reachability manager for the specified domain.
domain | The domain used to evaluate network reachability. |
+ (instancetype) managerForAddress: | (const void *) | address |
Creates and returns a network reachability manager for the socket address.
address | The socket address (sockaddr_in ) used to evaluate network reachability. |
- (instancetype) initWithReachability: | (SCNetworkReachabilityRef) | NS_DESIGNATED_INITIALIZER |
Initializes an instance of a network reachability manager from the specified reachability object.
reachability | The reachability object to monitor. |
- (void) startMonitoring |
Starts monitoring for changes in network reachability status.
- (void) stopMonitoring |
Stops monitoring for changes in network reachability status.
- (NSString *) localizedNetworkReachabilityStatusString |
Returns a localized string representation of the current network reachability status.
- (void) setReachabilityStatusChangeBlock: | (void(^)(TRCNetworkReachabilityStatus status)) | block |
Sets a callback to be executed when the network availability of the baseURL
host changes.
block | A block object to be executed when the network availability of the baseURL host changes.. This block has no return value and takes a single argument which represents the various reachability states from the device to the baseURL . |