Attempts to determine whether or not the host pointed to by connectable
can be reached, without actually trying to connect
to it.
This may return true even when
network_available is false
, if, for example, this can determine that connectable
refers to a host on a local
network.
If this believes that an attempt to connect to connectable
will succeed, it will return
true. Otherwise, it will return false and set
throws to an appropriate error (such as g_io_error_host_unreachable).
Note that although this does not attempt to connect to connectable
, it may still block for a brief period of time (eg,
trying to do multicast DNS on the local network), so if you do not want to block, you should use
can_reach_async.
this | |
connectable | |
cancellable |
a Cancellable, or null |
true if |