CFHostGetReachability(_:_:)
Gets reachability information from a host.
Declaration
func CFHostGetReachability(_ theHost: CFHost, _ hasBeenResolved: UnsafeMutablePointer<DarwinBoolean>?) -> Unmanaged<CFData>?Parameters
- theHost:
The host whose reachability is to be obtained. The host must have been previously resolved. (To resolve a host, call Cfhoststartinforesolution(_:_:_:).) This value must not be
NULL. - hasBeenResolved:
On return, contains
TRUEif the reachability was available, otherwiseFALSE. This value may beNULL.
Return Value
A CFData object that wraps the reachability flags (SCNetworkConnectionFlags) defined in SystemConfiguration/SCNetwork.h, or NULL if reachability information was not available.
Discussion
This function gets reachability information in a thread-safe way, but the resulting data is not thread-safe. The data is returned as a “get” as opposed to a copy, so the data is not safe if the CFHost is altered from another thread.
See Also
Hosts
CFHostCFHostInfoTypeCFHostClientContextCFHostCancelInfoResolution(_:_:)CFHostCreateCopy(_:_:)CFHostCreateWithAddress(_:_:)CFHostCreateWithName(_:_:)CFHostGetAddressing(_:_:)CFHostGetNames(_:_:)CFHostGetTypeID()CFHostScheduleWithRunLoop(_:_:_:)CFHostSetClient(_:_:_:)CFHostStartInfoResolution(_:_:_:)CFHostUnscheduleFromRunLoop(_:_:_:)