Function gnunet_sys::GNUNET_ATS_reserve_bandwidth[][src]

pub unsafe extern "C" fn GNUNET_ATS_reserve_bandwidth(
    ph: *mut GNUNET_ATS_PerformanceHandle,
    peer: *const GNUNET_PeerIdentity,
    amount: i32,
    rcb: GNUNET_ATS_ReservationCallback,
    rcb_cls: *mut c_void
) -> *mut GNUNET_ATS_ReservationContext

Reserve inbound bandwidth from the given peer. ATS will look at the current amount of traffic we receive from the peer and ensure that the peer could add ‘amount’ of data to its stream.

@param ph performance handle @param peer identifies the peer @param amount reserve N bytes for receiving, negative amounts can be used to undo a (recent) reservation; @param rcb function to call with the resulting reservation information @param rcb_cls closure for @a rcb @return NULL on error @deprecated will be replaced soon