////////////// Derived //////////////////
The callback function used to determine the length allowed in DataProvider
Callback function invoked when a chunk of data in DATA frame is received.
Callback function invoked by Session.recv when a frame is received.
The callback function invoked when a non-DATA frame is not sent because of an error.
Sets callback function invoked when a frame header is received.
Callback function invoked before a non-DATA frame is sent.
Callback function invoked after a frame is sent.
Callback function invoked when a header name/value pair is received.
Callback function invoked when the reception of header block in HEADERS or PUSH_PROMISE is started.
Callback function invoked by Session.recv when an invalid non-DATA frame is received.
Callback function invoked when the stream is closed.
Callback function invoked when the session wants to receive data from the remote peer. This callback is not necessary if the application uses solely nghttp2_session_mem_recv() to process received data.
Callback function invoked when the library asks application how many padding bytes are required for the transmission of the given frame.
Callback function invoked when the session wants to send data to the remote peer. This callback is not necessary if the application uses solely Session.memSend to serialize data to transmit.
Callback function invoked when DataFlags.NO_COPY is used in DataProvider to avoid data copy.
Callback function invoked when Session wants to send data to the remote peer. The implementation of this function must send at most |data.length| bytes of data stored in |data|. It must return the number of bytes sent if it succeeds. If it cannot send any single byte without blocking, it must return ErrorCode.WOULDBLOCK. For other errors, it must return ErrorCode.CALLBACK_FAILURE.
Callback function invoked when DataFlags.NO_COPY is used in DataProvider to send complete DATA frame.
Callback function invoked when Session wants to receive data from the remote peer. The implementation of this function must read at most |data.length| bytes of data and store it in |data|.
Callback function invoked when the stream |stream_id| is closed. The reason of closure is indicated by the |error_code|. The |error_code| is usually one of FrameError, but that is not guaranteed.
Callback function invoked by Session.recv when a frame is received. The |user_data| pointer is the third argument passed in to the call to http2_session_client_new() or http2_session_server_new().
Callback function invoked when a frame header is received. The |hd| points to received frame header.
Callback function invoked when the reception of header block in HEADERS or PUSH_PROMISE is started. Each header header field will be emitted by Connector.onHeaderField`.
Callback function invoked when a header header field is received for the |frame|. The |hf.name| of length |hf.name.length| is header name. The |hf.value| of length |hf.value.length| is header value. The |hf.flags| is a HeaderFlag.
Callback function invoked when a chunk of data in DATA frame is received. The |stream_id| is the stream this DATA frame belongs to. The |flags| is the flags of DATA frame which this data chunk is contained. `(flags & FrameFlags.END_STREAM) != 0` does not necessarily mean this chunk of data is the last one in the stream. You should use Connector.onFrame to determine that all data frames are received.
Callback function invoked by Session.recv when an invalid non-DATA frame is received. The |error_code| indicates the error. It is usually one of the FrameError but that is not guaranteed. When this callback function is invoked, the library automatically submits either RST_STREAM or GOAWAY frame.
Callback function invoked after the non-DATA frame |frame| is not sent because of the error. The error is indicated by the |error_code|, which is one of the values defined in ErrorCode.
Callback function invoked just before the non-DATA frame |frame| is sent.
Callback function invoked after the frame |frame| is sent.
Callback function invoked when the library asks application how many padding bytes are required for the transmission of the |frame|. The application must choose the total length of payload including padded bytes in range [frame.hd.length, max_payloadlen], inclusive. Choosing number not in this range will be treated as ErrorCode.CALLBACK_FAILURE. Returning `frame.hd.length` means no padding is added. Returning ErrorCode.CALLBACK_FAILURE will make Session.send() function immediately return ErrorCode.CALLBACK_FAILURE.
Callback function invoked when library wants to get max length of data to send data to the remote peer. The implementation of this function should return a value in the following range. [1, min(|session_remote_window_size|, |stream_remote_window_size|, |remote_max_frame_size|)]. If a value greater than this range is returned than the max allow value will be used. Returning a value smaller than this range is treated as ErrorCode.CALLBACK_FAILURE. The |frame_type| is provided for future extensibility and identifies the type of frame (see FrameType) for which to get the length for. Currently supported frame types are: HTTP2_DATA.