Function

SCNetworkReachabilityCreateWithAddress(_:_:)

Creates a reachability reference to the specified network address.

Declaration

func SCNetworkReachabilityCreateWithAddress(_ allocator: CFAllocator?, _ address: UnsafePointer<sockaddr>) -> SCNetworkReachability?

Parameters

allocator

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

address

The address of the desired host. 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.

See Also

Creating a Reachability Reference