Function gnunet_sys::GNUNET_BANDWIDTH_tracker_init2[][src]

pub unsafe extern "C" fn GNUNET_BANDWIDTH_tracker_init2(
    av: *mut GNUNET_BANDWIDTH_Tracker,
    update_cb: GNUNET_BANDWIDTH_TrackerUpdateCallback,
    update_cb_cls: *mut c_void,
    bytes_per_second_limit: GNUNET_BANDWIDTH_Value32NBO,
    max_carry_s: u32,
    excess_cb: GNUNET_BANDWIDTH_ExcessNotificationCallback,
    excess_cb_cls: *mut c_void
)

Initialize bandwidth tracker. Note that in addition to the ‘max_carry_s’ limit, we also always allow at least #GNUNET_MAX_MESSAGE_SIZE to accumulate. So if the bytes-per-second limit is so small that within ‘max_carry_s’ not even #GNUNET_MAX_MESSAGE_SIZE is allowed to accumulate, it is ignored and replaced by #GNUNET_MAX_MESSAGE_SIZE (which is in bytes).

@param av tracker to initialize @param update_cb callback to notify a client about the tracker being updated @param update_cb_cls cls for the @a update_cb callback @param bytes_per_second_limit initial limit to assume @param max_carry_s maximum number of seconds unused bandwidth may accumulate before it expires @param excess_cb callback to notify if we have excess bandwidth @param excess_cb_cls closure for @a excess_cb