Macros
-
NGHTTP3_VERSION
Version number of the nghttp3 library release.
-
NGHTTP3_VERSION_NUM
Numerical representation of the version number of the nghttp3 library release. This is a 24 bit number with 8 bits for major number, 8 bits for minor and 8 bits for patch. Version 1.2.3 becomes 0x010203.
-
NGHTTP3_ALPN_H3
NGHTTP3_ALPN_H3
is a serialized form of HTTP/3 ALPN protocol identifier this library supports. Notice that the first byte is the length of the following protocol identifier.
nghttp3 library error codes
-
NGHTTP3_ERR_INVALID_ARGUMENT
NGHTTP3_ERR_INVALID_ARGUMENT
indicates that a passed argument is invalid.
-
NGHTTP3_ERR_INVALID_STATE
NGHTTP3_ERR_INVALID_STATE
indicates that a requested operation is not allowed at the current connection state.
-
NGHTTP3_ERR_WOULDBLOCK
NGHTTP3_ERR_WOULDBLOCK
indicates that an operation might block.
-
NGHTTP3_ERR_STREAM_IN_USE
NGHTTP3_ERR_STREAM_IN_USE
indicates that a stream ID is already in use.
-
NGHTTP3_ERR_MALFORMED_HTTP_HEADER
NGHTTP3_ERR_MALFORMED_HTTP_HEADER
indicates that an HTTP header field is malformed.
-
NGHTTP3_ERR_REMOVE_HTTP_HEADER
NGHTTP3_ERR_REMOVE_HTTP_HEADER
indicates that an HTTP header field is discarded.
-
NGHTTP3_ERR_MALFORMED_HTTP_MESSAGING
NGHTTP3_ERR_MALFORMED_HTTP_MESSAGING
indicates that HTTP messaging is malformed.
-
NGHTTP3_ERR_QPACK_FATAL
NGHTTP3_ERR_QPACK_FATAL
indicates that a fatal error is occurred during QPACK processing, and it cannot be recoverable.
-
NGHTTP3_ERR_QPACK_HEADER_TOO_LARGE
NGHTTP3_ERR_QPACK_HEADER_TOO_LARGE
indicates that a header field is too large to process.
-
NGHTTP3_ERR_STREAM_NOT_FOUND
NGHTTP3_ERR_STREAM_NOT_FOUND
indicates that a stream is not found.
-
NGHTTP3_ERR_CONN_CLOSING
NGHTTP3_ERR_CONN_CLOSING
indicates that a connection is closing state.
-
NGHTTP3_ERR_STREAM_DATA_OVERFLOW
NGHTTP3_ERR_STREAM_DATA_OVERFLOW
indicates that the length of stream data is too long, and causes overflow.
-
NGHTTP3_ERR_QPACK_DECOMPRESSION_FAILED
NGHTTP3_ERR_QPACK_DECOMPRESSION_FAILED
indicates that a QPACK decompression failed.
-
NGHTTP3_ERR_QPACK_ENCODER_STREAM_ERROR
NGHTTP3_ERR_QPACK_ENCODER_STREAM_ERROR
indicates that an error occurred while reading QPACK encoder stream.
-
NGHTTP3_ERR_QPACK_DECODER_STREAM_ERROR
NGHTTP3_ERR_QPACK_DECODER_STREAM_ERROR
indicates that an error occurred while reading QPACK decoder stream.
-
NGHTTP3_ERR_H3_FRAME_UNEXPECTED
NGHTTP3_ERR_H3_FRAME_UNEXPECTED
indicates that an unexpected HTTP/3 frame is received.
-
NGHTTP3_ERR_H3_FRAME_ERROR
NGHTTP3_ERR_H3_FRAME_ERROR
indicates that an HTTP/3 frame is malformed.
-
NGHTTP3_ERR_H3_MISSING_SETTINGS
NGHTTP3_ERR_H3_MISSING_SETTINGS
indicates that an HTTP/3 SETTINGS frame is missing.
-
NGHTTP3_ERR_H3_INTERNAL_ERROR
NGHTTP3_ERR_H3_INTERNAL_ERROR
indicates an internal error.
-
NGHTTP3_ERR_H3_CLOSED_CRITICAL_STREAM
NGHTTP3_ERR_H3_CLOSED_CRITICAL_STREAM
indicates that a critical stream is closed.
-
NGHTTP3_ERR_H3_GENERAL_PROTOCOL_ERROR
NGHTTP3_ERR_H3_GENERAL_PROTOCOL_ERROR
indicates a general protocol error. This is typically a catch-all error.
-
NGHTTP3_ERR_H3_ID_ERROR
NGHTTP3_ERR_H3_ID_ERROR
indicates that an ID related error occurred.
-
NGHTTP3_ERR_H3_SETTINGS_ERROR
NGHTTP3_ERR_H3_SETTINGS_ERROR
indicates that an HTTP/3 SETTINGS frame is malformed.
-
NGHTTP3_ERR_H3_STREAM_CREATION_ERROR
NGHTTP3_ERR_H3_STREAM_CREATION_ERROR
indicates that a remote endpoint attempts to create a new stream which is not allowed.
-
NGHTTP3_ERR_FATAL
NGHTTP3_ERR_FATAL
indicates that error codes less than this value is fatal error. When this error is returned, an endpoint should drop connection immediately.
-
NGHTTP3_ERR_NOMEM
NGHTTP3_ERR_NOMEM
indicates out of memory.
-
NGHTTP3_ERR_CALLBACK_FAILURE
NGHTTP3_ERR_CALLBACK_FAILURE
indicates that user defined callback function failed.
HTTP/3 application error code
-
NGHTTP3_H3_NO_ERROR
NGHTTP3_H3_NO_ERROR
is HTTP/3 application error codeH3_NO_ERROR
.
-
NGHTTP3_H3_GENERAL_PROTOCOL_ERROR
NGHTTP3_H3_GENERAL_PROTOCOL_ERROR
is HTTP/3 application error codeH3_GENERAL_PROTOCOL_ERROR
.
-
NGHTTP3_H3_INTERNAL_ERROR
NGHTTP3_H3_INTERNAL_ERROR
is HTTP/3 application error codeH3_INTERNAL_ERROR
.
-
NGHTTP3_H3_STREAM_CREATION_ERROR
NGHTTP3_H3_STREAM_CREATION_ERROR
is HTTP/3 application error codeH3_STREAM_CREATION_ERROR
.
-
NGHTTP3_H3_CLOSED_CRITICAL_STREAM
NGHTTP3_H3_CLOSED_CRITICAL_STREAM
is HTTP/3 application error codeH3_CLOSED_CRITICAL_STREAM
.
-
NGHTTP3_H3_FRAME_UNEXPECTED
NGHTTP3_H3_FRAME_UNEXPECTED
is HTTP/3 application error codeH3_FRAME_UNEXPECTED
.
-
NGHTTP3_H3_FRAME_ERROR
NGHTTP3_H3_FRAME_ERROR
is HTTP/3 application error codeH3_FRAME_ERROR
.
-
NGHTTP3_H3_EXCESSIVE_LOAD
NGHTTP3_H3_EXCESSIVE_LOAD
is HTTP/3 application error codeH3_EXCESSIVE_LOAD
.
-
NGHTTP3_H3_ID_ERROR
NGHTTP3_H3_ID_ERROR
is HTTP/3 application error codeH3_ID_ERROR
.
-
NGHTTP3_H3_SETTINGS_ERROR
NGHTTP3_H3_SETTINGS_ERROR
is HTTP/3 application error codeH3_SETTINGS_ERROR
.
-
NGHTTP3_H3_MISSING_SETTINGS
NGHTTP3_H3_MISSING_SETTINGS
is HTTP/3 application error codeH3_MISSING_SETTINGS
.
-
NGHTTP3_H3_REQUEST_REJECTED
NGHTTP3_H3_REQUEST_REJECTED
is HTTP/3 application error codeH3_REQUEST_REJECTED
.
-
NGHTTP3_H3_REQUEST_CANCELLED
NGHTTP3_H3_REQUEST_CANCELLED
is HTTP/3 application error codeH3_REQUEST_CANCELLED
.
-
NGHTTP3_H3_REQUEST_INCOMPLETE
NGHTTP3_H3_REQUEST_INCOMPLETE
is HTTP/3 application error codeH3_REQUEST_INCOMPLETE
.
-
NGHTTP3_H3_MESSAGE_ERROR
NGHTTP3_H3_MESSAGE_ERROR
is HTTP/3 application error codeH3_MESSAGE_ERROR
.
-
NGHTTP3_H3_CONNECT_ERROR
NGHTTP3_H3_CONNECT_ERROR
is HTTP/3 application error codeH3_CONNECT_ERROR
.
-
NGHTTP3_H3_VERSION_FALLBACK
NGHTTP3_H3_VERSION_FALLBACK
is HTTP/3 application error codeH3_VERSION_FALLBACK
.
-
NGHTTP3_QPACK_DECOMPRESSION_FAILED
NGHTTP3_QPACK_DECOMPRESSION_FAILED
is HTTP/3 application error codeQPACK_DECOMPRESSION_FAILED
.
-
NGHTTP3_QPACK_ENCODER_STREAM_ERROR
NGHTTP3_QPACK_ENCODER_STREAM_ERROR
is HTTP/3 application error codeQPACK_ENCODER_STREAM_ERROR
.
-
NGHTTP3_QPACK_DECODER_STREAM_ERROR
NGHTTP3_QPACK_DECODER_STREAM_ERROR
is HTTP/3 application error codeQPACK_DECODER_STREAM_ERROR
.
Flags for HTTP field name/value pair
-
NGHTTP3_NV_FLAG_NONE
NGHTTP3_NV_FLAG_NONE
indicates no flag set.
-
NGHTTP3_NV_FLAG_NEVER_INDEX
NGHTTP3_NV_FLAG_NEVER_INDEX
indicates that this name/value pair must not be indexed. Other implementation calls this bit as “sensitive”.
-
NGHTTP3_NV_FLAG_NO_COPY_NAME
NGHTTP3_NV_FLAG_NO_COPY_NAME
is set solely by application. If this flag is set, the library does not make a copy of field name. This could improve performance.
-
NGHTTP3_NV_FLAG_NO_COPY_VALUE
NGHTTP3_NV_FLAG_NO_COPY_VALUE
is set solely by application. If this flag is set, the library does not make a copy of field value. This could improve performance.
-
NGHTTP3_NV_FLAG_TRY_INDEX
NGHTTP3_NV_FLAG_TRY_INDEX
gives a hint to QPACK encoder to index an HTTP field which is not indexed by default. This is just a hint, and QPACK encoder might not encode the field in various reasons.
Flags for QPACK decoder
-
NGHTTP3_QPACK_DECODE_FLAG_NONE
NGHTTP3_QPACK_DECODE_FLAG_NONE
indicates that no flag set.
-
NGHTTP3_QPACK_DECODE_FLAG_EMIT
NGHTTP3_QPACK_DECODE_FLAG_EMIT
indicates that an HTTP field is successfully decoded.
-
NGHTTP3_QPACK_DECODE_FLAG_FINAL
NGHTTP3_QPACK_DECODE_FLAG_FINAL
indicates that an entire HTTP field section has been decoded.
-
NGHTTP3_QPACK_DECODE_FLAG_BLOCKED
NGHTTP3_QPACK_DECODE_FLAG_BLOCKED
indicates that decoding has been blocked.
Data flags
-
NGHTTP3_DATA_FLAG_NONE
NGHTTP3_DATA_FLAG_NONE
indicates no flag set.
-
NGHTTP3_DATA_FLAG_EOF
NGHTTP3_DATA_FLAG_EOF
indicates that all request or response body has been provided to the library. It also indicates that sending side of stream is closed unlessNGHTTP3_DATA_FLAG_NO_END_STREAM
is given at the same time.
-
NGHTTP3_DATA_FLAG_NO_END_STREAM
NGHTTP3_DATA_FLAG_NO_END_STREAM
indicates that sending side of stream is not closed even ifNGHTTP3_DATA_FLAG_EOF
is set. Usually this flag is used to send trailer fields withnghttp3_conn_submit_trailers()
. Ifnghttp3_conn_submit_trailers()
has been called, regardless of this flag, the submitted trailer fields are sent.
HTTP stream priority flags
-
NGHTTP3_DEFAULT_URGENCY
NGHTTP3_DEFAULT_URGENCY
is the default urgency level.
-
NGHTTP3_URGENCY_HIGH
NGHTTP3_URGENCY_HIGH
is the highest urgency level.
-
NGHTTP3_URGENCY_LOW
NGHTTP3_URGENCY_LOW
is the lowest urgency level.
-
NGHTTP3_URGENCY_LEVELS
NGHTTP3_URGENCY_LEVELS
is the number of urgency levels.
nghttp3_info flags
-
NGHTTP3_VERSION_AGE
NGHTTP3_VERSION_AGE
is the age ofnghttp3_info
.