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
-
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 -
flags
The 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.
-
– reachabilities
Returns 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> delegate
Declared In
BMNetworkReachabilityController.h
flags
The OR'ed flags of all reachability references managed by the receiver. This property is KVO-compliant.
@property (nonatomic, assign, readonly) SCNetworkReachabilityFlags flags
Declared In
BMNetworkReachabilityController.h
Instance Methods
addReachability:
Adds a new reachability reference to the receiver.
- (BOOL)addReachability:(SCNetworkReachabilityRef)reachability
Parameters
- reachability
The new reachability reference.
Return Value
YES
if the reachability was added successfully, NO
otherwise.
See Also
Declared In
BMNetworkReachabilityController.h
addReachabilityWithAddress:
Creates a new reachability reference to the specified network address and adds it to the receiver.
- (BOOL)addReachabilityWithAddress:(const struct sockaddr *)address
Parameters
- address
The address of the desired host.
Return Value
YES
if the new reachability was added successfully, NO
otherwise.
See Also
Declared In
BMNetworkReachabilityController.h
addReachabilityWithLocalAddress: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 *)remoteAddress
Parameters
- 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.h
addReachabilityWithName:
Creates a new reachability reference to the specified network host or node name and adds it to the receiver.
- (BOOL)addReachabilityWithName:(NSString *)name
Parameters
- name
The node name of the desired host. This name is the same as that passed to the
gethostbyname
orgetaddrinfo
functions.
Return Value
YES
if the new reachability was added successfully, NO
otherwise.
See Also
Declared In
BMNetworkReachabilityController.h
reachabilities
Returns an array with all reachability references managed by the receiver.
- (NSArray *)reachabilities
Return Value
An array with all reachability references managed by the receiver.
See Also
Declared In
BMNetworkReachabilityController.h
removeReachability:
Removes a reachability reference from the receiver.
- (BOOL)removeReachability:(SCNetworkReachabilityRef)reachability
Parameters
- reachability
The reachability reference to remove.
Return Value
YES
if reachability was removed successfully, NO
otherwise.
See Also
Declared In
BMNetworkReachabilityController.h