Function

SCNetworkReachabilitySetCallback

Assigns a client to the specified target, which receives callbacks when the reachability of the target changes.

Declaration

Boolean SCNetworkReachabilitySetCallback(SCNetworkReachabilityRef target, SCNetworkReachabilityCallBack callout, SCNetworkReachabilityContext *context);

Parameters

target

The network reference associated with the address or name to be checked for reachability.

callout

The function to be called when the reachability of the target changes. If NULL, the current client for the target is removed.

context

The reachability context associated with the callout. This value may be NULL.

Return Value

TRUE if the notification client was successfully set; otherwise, FALSE.

See Also

Preparing to Determine Reachability

SCNetworkReachabilityGetTypeID

Returns the type identifier of all SCNetworkReachability instances.

SCNetworkReachabilityScheduleWithRunLoop

Schedules the specified network target with the specified run loop and mode.

SCNetworkReachabilityUnscheduleFromRunLoop

Unschedules the specified target from the specified run loop and mode.

SCNetworkReachabilitySetDispatchQueue

Schedules callbacks for the specified target on the specified dispatch queue.