Function gnunet_sys::GNUNET_CORE_is_peer_connected_sync[][src]

pub unsafe extern "C" fn GNUNET_CORE_is_peer_connected_sync(
    h: *const GNUNET_CORE_Handle,
    pid: *const GNUNET_PeerIdentity
) -> c_int

Check if the given peer is currently connected. This function is for special circumstances (GNUNET_TESTBED uses it), normal users of the CORE API are expected to track which peers are connected based on the connect/disconnect callbacks from #GNUNET_CORE_connect. This function is NOT part of the ‘versioned’, ‘official’ API. This function returns synchronously after looking in the CORE API cache.

@param h the core handle @param pid the identity of the peer to check if it has been connected to us @return #GNUNET_YES if the peer is connected to us; #GNUNET_NO if not