Contents

SCNetworkReachabilitySetCallback(_:_:_:)

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

Declaration

func SCNetworkReachabilitySetCallback(_ target: SCNetworkReachability, _ callout: SCNetworkReachabilityCallBack?, _ context: UnsafeMutablePointer<SCNetworkReachabilityContext>?) -> Bool

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