Creates a reachability reference to the specified network host or node name.
SDKs
- iOS 2.0+
- macOS 10.3+
- Mac Catalyst 13.0+
- tvOS 9.0+
Framework
- System
Configuration
Declaration
func SCNetworkReachabilityCreateWithName(_ allocator: CFAllocator?, _ nodename: Unsafe Pointer<Int8>) -> SCNetwork Reachability?
Parameters
allocator
The allocator to use. Pass
NULL
ork
to use the default allocator.CFAllocator Default nodename
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.
Discussion
You can use the reachability reference returned by this function to monitor the reachability of the target host.