Creates a reachability reference to the specified network host or node name.


func SCNetworkReachabilityCreateWithName(_ allocator: CFAllocator?, _ nodename: UnsafePointer<Int8>) -> SCNetworkReachability?



The allocator to use. Pass NULL or kCFAllocatorDefault to use the default allocator.


The node name of the desired host. This name is the same as that passed to the gethostbyname or getaddrinfo functions. The value of this parameter is copied into the new object.

Return Value

A new immutable reachability reference. You must release the returned value.


You can use the reachability reference returned by this function to monitor the reachability of the target host.

See Also

Creating a Reachability Reference

Beta Software

This documentation contains preliminary information about an API or technology in development. This information is subject to change, and software implemented according to this documentation should be tested with final operating system software.

Learn more about using Apple's beta software