nghttp2_conn_submit_response
Synopsis
#include <nghttp2v2/nghttp2.h>
-
int nghttp2_conn_submit_response(nghttp2_conn *conn, int64_t stream_id, const nghttp2_nv *nva, size_t nvlen, const nghttp2_data_reader *dr)
nghttp2_conn_submit_response()submits HTTP response header fields and body on the stream identified by stream_id. nva of length nvlen specifies HTTP response header fields. dr specifies a response body. If there is no response body, specifyNULL. If dr isNULL, it implies the end of stream.This function returns 0 if it succeeds, or one of the following negative error codes:
NGHTTP2_ERR_NOMEMOut of memory.
NGHTTP2_ERR_STREAM_NOT_FOUNDStream not found
NGHTTP2_ERR_STREAM_STATEThe final response headers have already been submitted.
NGHTTP2_ERR_STREAM_SHUT_WRThe send side of the stream has been closed.