Type Definition libnghttp2_sys::nghttp2_error_callback
source · [−]pub type nghttp2_error_callback = Option<unsafe extern "C" fn(session: *mut nghttp2_session, msg: *const c_char, len: usize, user_data: *mut c_void) -> c_int>;
Expand description
@functypedef
Callback function invoked when library provides the error message intended for human consumption. This callback is solely for debugging purpose. The |msg| is typically NULL-terminated string of length |len|. |len| does not include the sentinel NULL character.
This function is deprecated. The new application should use
:type:nghttp2_error_callback2
.
The format of error message may change between nghttp2 library versions. The application should not depend on the particular format.
Normally, application should return 0 from this callback. If fatal
error occurred while doing something in this callback, application
should return :enum:NGHTTP2_ERR_CALLBACK_FAILURE
. In this case,
library will return immediately with return value
:enum:NGHTTP2_ERR_CALLBACK_FAILURE
. Currently, if nonzero value
is returned from this callback, they are treated as
:enum:NGHTTP2_ERR_CALLBACK_FAILURE
, but application should not
rely on this details.