BMNetworkReachabilityController Class Reference
| Inherits from | NSObject |
| Declared in | BMNetworkReachabilityController.h |
Overview
You use a network reachability controller to easily manage a bunch of SCNetworkReachabilityRef references.
Tasks
Other Methods
-
delegateThe object that is notified whenever a new reachability reference is added to the receiver, an existing reachability reference is removed or the flags of a reachability reference managed by the receiver changed.
property -
flagsThe OR'ed flags of all reachability references managed by the receiver. This property is KVO-compliant.
property
Managing Reachabilities
-
– addReachability:Adds a new reachability reference to the receiver.
-
– addReachabilityWithAddress:Creates a new reachability reference to the specified network address and adds it to the receiver.
-
– addReachabilityWithLocalAddress:remoteAddress:Creates a new reachability reference to the specified network address pair and adds it to the receiver.
-
– addReachabilityWithName:Creates a new reachability reference to the specified network host or node name and adds it to the receiver.
-
– removeReachability:Removes a reachability reference from the receiver.
-
– reachabilitiesReturns an array with all reachability references managed by the receiver.
Properties
delegate
The object that is notified whenever a new reachability reference is added to the receiver, an existing reachability reference is removed or the flags of a reachability reference managed by the receiver changed.
@property (nonatomic, assign) id<BMNetworkReachabilityControllerDelegate> delegateDeclared In
BMNetworkReachabilityController.hflags
The OR'ed flags of all reachability references managed by the receiver. This property is KVO-compliant.
@property (nonatomic, assign, readonly) SCNetworkReachabilityFlags flagsDeclared In
BMNetworkReachabilityController.hInstance Methods
addReachability:
Adds a new reachability reference to the receiver.
- (BOOL)addReachability:(SCNetworkReachabilityRef)reachabilityParameters
- reachability
The new reachability reference.
Return Value
YES if the reachability was added successfully, NO otherwise.
See Also
Declared In
BMNetworkReachabilityController.haddReachabilityWithAddress:
Creates a new reachability reference to the specified network address and adds it to the receiver.
- (BOOL)addReachabilityWithAddress:(const struct sockaddr *)addressParameters
- address
The address of the desired host.
Return Value
YES if the new reachability was added successfully, NO otherwise.
See Also
Declared In
BMNetworkReachabilityController.haddReachabilityWithLocalAddress:remoteAddress:
Creates a new reachability reference to the specified network address pair and adds it to the receiver.
- (BOOL)addReachabilityWithLocalAddress:(const struct sockaddr *)localAddress remoteAddress:(const struct sockaddr *)remoteAddressParameters
- localAddress
The local address associated with a network connection. If
NULL, only the remoteAddress is of interest.
- remoteAddress
The remote address associated with a network connection. If
NULL, only the localAddress is of interest.
Return Value
YES if the new reachability was added successfully, NO otherwise.
See Also
Declared In
BMNetworkReachabilityController.haddReachabilityWithName:
Creates a new reachability reference to the specified network host or node name and adds it to the receiver.
- (BOOL)addReachabilityWithName:(NSString *)nameParameters
- name
The node name of the desired host. This name is the same as that passed to the
gethostbynameorgetaddrinfofunctions.
Return Value
YES if the new reachability was added successfully, NO otherwise.
See Also
Declared In
BMNetworkReachabilityController.hreachabilities
Returns an array with all reachability references managed by the receiver.
- (NSArray *)reachabilitiesReturn Value
An array with all reachability references managed by the receiver.
See Also
Declared In
BMNetworkReachabilityController.hremoveReachability:
Removes a reachability reference from the receiver.
- (BOOL)removeReachability:(SCNetworkReachabilityRef)reachabilityParameters
- reachability
The reachability reference to remove.
Return Value
YES if reachability was removed successfully, NO otherwise.
See Also
Declared In
BMNetworkReachabilityController.h