can_reach_sync


Description:

[ Version ( since = "3.12" ) ]
public bool can_reach_sync (Cancellable? cancellable = null) throws Error

Attempts to determine whether or not the host described by this's connectable property can be reached, without actually trying to connect to it.

If this believes an attempt to connect will succeed, the function returns true . Otherwise the function returns false and sets throws to an appropriate error (such as g_io_error_host_unreachable).

The function will also update the this's host_reachable property based on the result.

Parameters:

this

a NetworkService

cancellable

optional Cancellable object, or null

Returns:

whether the host for this can be reached