pub unsafe extern "C" fn nghttp2_submit_priority(
    session: *mut nghttp2_session,
    flags: u8,
    stream_id: i32,
    pri_spec: *const nghttp2_priority_spec
) -> c_int
Expand description

@function

Submits PRIORITY frame to change the priority of stream |stream_id| to the priority specification |pri_spec|.

The |flags| is currently ignored and should be :enum:NGHTTP2_FLAG_NONE.

The |pri_spec| is priority specification of this request. NULL is not allowed for this function. To specify the priority, use nghttp2_priority_spec_init(). This function will copy its data members.

The pri_spec->weight must be in [:enum:NGHTTP2_MIN_WEIGHT, :enum:NGHTTP2_MAX_WEIGHT], inclusive. If pri_spec->weight is strictly less than :enum:NGHTTP2_MIN_WEIGHT, it becomes :enum:NGHTTP2_MIN_WEIGHT. If it is strictly greater than :enum:NGHTTP2_MAX_WEIGHT, it becomes :enum:NGHTTP2_MAX_WEIGHT.

This function returns 0 if it succeeds, or one of the following negative error codes:

:enum:NGHTTP2_ERR_NOMEM Out of memory. :enum:NGHTTP2_ERR_INVALID_ARGUMENT The |stream_id| is 0; or the |pri_spec| is NULL; or trying to depend on itself.