pub unsafe extern "C-unwind" fn SCNetworkCheckReachabilityByAddress(
address: NonNull<sockaddr>,
addrlen: socklen_t,
flags: NonNull<SCNetworkConnectionFlags>,
) -> bool👎Deprecated: No longer supported
Available on crate features
SCNetwork and libc only.Expand description
Determines if the given network address is reachable using the current network configuration.
Note: this API has been deprecated but you can get equivalent results with :
SCNetworkReachabilityRef target; SCNetworkReachabilityFlags flags = 0; Boolean ok; target = SCNetworkReachabilityCreateWithAddress(NULL, address); ok = SCNetworkReachabilityGetFlags(target, &flags ); CFRelease(target);
Parameter address: The network address of the desired host.
Parameter addrlen: The length, in bytes, of the address.
Parameter flags: A pointer to memory that will be filled with a
set of SCNetworkConnectionFlags detailing the reachability
of the specified address.
Returns: Returns TRUE if the network connection flags are valid; FALSE if the status could not be determined.