Type Definition gnunet_sys::GNUNET_TRANSPORT_PeerIterateCallback[][src]

type GNUNET_TRANSPORT_PeerIterateCallback = Option<unsafe extern "C" fn(cls: *mut c_void, peer: *const GNUNET_PeerIdentity, address: *const GNUNET_HELLO_Address, state: GNUNET_TRANSPORT_PeerState, state_timeout: GNUNET_TIME_Absolute)>;

Function to call with information about a peer

If one_shot was set to #GNUNET_YES to iterate over all peers once, a final call with NULL for peer and address will follow when done. In this case state and timeout do not contain valid values.

The #GNUNET_TRANSPORT_monitor_peers_cancel() call MUST not be called from within this function!

@param cls closure @param peer peer this update is about, NULL if this is the final last callback for a iteration operation @param address address, NULL if this is the final callback for iteration op @param state current state this peer is in @param state_timeout timeout for the current state of the peer