SCNetwork programming interface allows an application to determine the status of a system's current network configuration and the reachability of a target host. A remote host is considered reachable when a data packet, sent by an application into the network stack, can leave the local device. Reachability does not guarantee that the data packet will actually be received by the host.
SCNetwork programming interface supports a synchronous and an asynchronous model. In the synchronous model, you get the reachability status by calling the
SCNetwork function. In the asynchronous model, you can schedule the
SCNetwork object on the run loop of a client object’s thread. The client implements a callback function to receive notifications when the reachability status of a given remote host changes. Note that these functions follow Core Foundation naming conventions. A function that has "Create" or "Copy" in its name returns a reference you must release with the
For information about detecting and interpreting errors generated by calling these functions, see System Configuration.