Macros ====== .. macro:: NGHTTP3_VERSION Version number of the nghttp3 library release. .. macro:: 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. .. macro:: NGHTTP3_ALPN_H3 :macro:`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 --------------------------- .. macro:: NGHTTP3_ERR_INVALID_ARGUMENT :macro:`NGHTTP3_ERR_INVALID_ARGUMENT` indicates that a passed argument is invalid. .. macro:: NGHTTP3_ERR_INVALID_STATE :macro:`NGHTTP3_ERR_INVALID_STATE` indicates that a requested operation is not allowed at the current connection state. .. macro:: NGHTTP3_ERR_WOULDBLOCK :macro:`NGHTTP3_ERR_WOULDBLOCK` indicates that an operation might block. .. macro:: NGHTTP3_ERR_STREAM_IN_USE :macro:`NGHTTP3_ERR_STREAM_IN_USE` indicates that a stream ID is already in use. .. macro:: NGHTTP3_ERR_MALFORMED_HTTP_HEADER :macro:`NGHTTP3_ERR_MALFORMED_HTTP_HEADER` indicates that an HTTP header field is malformed. .. macro:: NGHTTP3_ERR_REMOVE_HTTP_HEADER :macro:`NGHTTP3_ERR_REMOVE_HTTP_HEADER` indicates that an HTTP header field is discarded. .. macro:: NGHTTP3_ERR_MALFORMED_HTTP_MESSAGING :macro:`NGHTTP3_ERR_MALFORMED_HTTP_MESSAGING` indicates that HTTP messaging is malformed. .. macro:: NGHTTP3_ERR_QPACK_FATAL :macro:`NGHTTP3_ERR_QPACK_FATAL` indicates that a fatal error is occurred during QPACK processing, and it cannot be recoverable. .. macro:: NGHTTP3_ERR_QPACK_HEADER_TOO_LARGE :macro:`NGHTTP3_ERR_QPACK_HEADER_TOO_LARGE` indicates that a header field is too large to process. .. macro:: NGHTTP3_ERR_STREAM_NOT_FOUND :macro:`NGHTTP3_ERR_STREAM_NOT_FOUND` indicates that a stream is not found. .. macro:: NGHTTP3_ERR_CONN_CLOSING :macro:`NGHTTP3_ERR_CONN_CLOSING` indicates that a connection is closing state. .. macro:: NGHTTP3_ERR_STREAM_DATA_OVERFLOW :macro:`NGHTTP3_ERR_STREAM_DATA_OVERFLOW` indicates that the length of stream data is too long, and causes overflow. .. macro:: NGHTTP3_ERR_QPACK_DECOMPRESSION_FAILED :macro:`NGHTTP3_ERR_QPACK_DECOMPRESSION_FAILED` indicates that a QPACK decompression failed. .. macro:: NGHTTP3_ERR_QPACK_ENCODER_STREAM_ERROR :macro:`NGHTTP3_ERR_QPACK_ENCODER_STREAM_ERROR` indicates that an error occurred while reading QPACK encoder stream. .. macro:: NGHTTP3_ERR_QPACK_DECODER_STREAM_ERROR :macro:`NGHTTP3_ERR_QPACK_DECODER_STREAM_ERROR` indicates that an error occurred while reading QPACK decoder stream. .. macro:: NGHTTP3_ERR_H3_FRAME_UNEXPECTED :macro:`NGHTTP3_ERR_H3_FRAME_UNEXPECTED` indicates that an unexpected HTTP/3 frame is received. .. macro:: NGHTTP3_ERR_H3_FRAME_ERROR :macro:`NGHTTP3_ERR_H3_FRAME_ERROR` indicates that an HTTP/3 frame is malformed. .. macro:: NGHTTP3_ERR_H3_MISSING_SETTINGS :macro:`NGHTTP3_ERR_H3_MISSING_SETTINGS` indicates that an HTTP/3 SETTINGS frame is missing. .. macro:: NGHTTP3_ERR_H3_INTERNAL_ERROR :macro:`NGHTTP3_ERR_H3_INTERNAL_ERROR` indicates an internal error. .. macro:: NGHTTP3_ERR_H3_CLOSED_CRITICAL_STREAM :macro:`NGHTTP3_ERR_H3_CLOSED_CRITICAL_STREAM` indicates that a critical stream is closed. .. macro:: NGHTTP3_ERR_H3_GENERAL_PROTOCOL_ERROR :macro:`NGHTTP3_ERR_H3_GENERAL_PROTOCOL_ERROR` indicates a general protocol error. This is typically a catch-all error. .. macro:: NGHTTP3_ERR_H3_ID_ERROR :macro:`NGHTTP3_ERR_H3_ID_ERROR` indicates that an ID related error occurred. .. macro:: NGHTTP3_ERR_H3_SETTINGS_ERROR :macro:`NGHTTP3_ERR_H3_SETTINGS_ERROR` indicates that an HTTP/3 SETTINGS frame is malformed. .. macro:: NGHTTP3_ERR_H3_STREAM_CREATION_ERROR :macro:`NGHTTP3_ERR_H3_STREAM_CREATION_ERROR` indicates that a remote endpoint attempts to create a new stream which is not allowed. .. macro:: NGHTTP3_ERR_FATAL :macro:`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. .. macro:: NGHTTP3_ERR_NOMEM :macro:`NGHTTP3_ERR_NOMEM` indicates out of memory. .. macro:: NGHTTP3_ERR_CALLBACK_FAILURE :macro:`NGHTTP3_ERR_CALLBACK_FAILURE` indicates that user defined callback function failed. HTTP/3 application error code ----------------------------- .. macro:: NGHTTP3_H3_NO_ERROR :macro:`NGHTTP3_H3_NO_ERROR` is HTTP/3 application error code ``H3_NO_ERROR``. .. macro:: NGHTTP3_H3_GENERAL_PROTOCOL_ERROR :macro:`NGHTTP3_H3_GENERAL_PROTOCOL_ERROR` is HTTP/3 application error code ``H3_GENERAL_PROTOCOL_ERROR``. .. macro:: NGHTTP3_H3_INTERNAL_ERROR :macro:`NGHTTP3_H3_INTERNAL_ERROR` is HTTP/3 application error code ``H3_INTERNAL_ERROR``. .. macro:: NGHTTP3_H3_STREAM_CREATION_ERROR :macro:`NGHTTP3_H3_STREAM_CREATION_ERROR` is HTTP/3 application error code ``H3_STREAM_CREATION_ERROR``. .. macro:: NGHTTP3_H3_CLOSED_CRITICAL_STREAM :macro:`NGHTTP3_H3_CLOSED_CRITICAL_STREAM` is HTTP/3 application error code ``H3_CLOSED_CRITICAL_STREAM``. .. macro:: NGHTTP3_H3_FRAME_UNEXPECTED :macro:`NGHTTP3_H3_FRAME_UNEXPECTED` is HTTP/3 application error code ``H3_FRAME_UNEXPECTED``. .. macro:: NGHTTP3_H3_FRAME_ERROR :macro:`NGHTTP3_H3_FRAME_ERROR` is HTTP/3 application error code ``H3_FRAME_ERROR``. .. macro:: NGHTTP3_H3_EXCESSIVE_LOAD :macro:`NGHTTP3_H3_EXCESSIVE_LOAD` is HTTP/3 application error code ``H3_EXCESSIVE_LOAD``. .. macro:: NGHTTP3_H3_ID_ERROR :macro:`NGHTTP3_H3_ID_ERROR` is HTTP/3 application error code ``H3_ID_ERROR``. .. macro:: NGHTTP3_H3_SETTINGS_ERROR :macro:`NGHTTP3_H3_SETTINGS_ERROR` is HTTP/3 application error code ``H3_SETTINGS_ERROR``. .. macro:: NGHTTP3_H3_MISSING_SETTINGS :macro:`NGHTTP3_H3_MISSING_SETTINGS` is HTTP/3 application error code ``H3_MISSING_SETTINGS``. .. macro:: NGHTTP3_H3_REQUEST_REJECTED :macro:`NGHTTP3_H3_REQUEST_REJECTED` is HTTP/3 application error code ``H3_REQUEST_REJECTED``. .. macro:: NGHTTP3_H3_REQUEST_CANCELLED :macro:`NGHTTP3_H3_REQUEST_CANCELLED` is HTTP/3 application error code ``H3_REQUEST_CANCELLED``. .. macro:: NGHTTP3_H3_REQUEST_INCOMPLETE :macro:`NGHTTP3_H3_REQUEST_INCOMPLETE` is HTTP/3 application error code ``H3_REQUEST_INCOMPLETE``. .. macro:: NGHTTP3_H3_MESSAGE_ERROR :macro:`NGHTTP3_H3_MESSAGE_ERROR` is HTTP/3 application error code ``H3_MESSAGE_ERROR``. .. macro:: NGHTTP3_H3_CONNECT_ERROR :macro:`NGHTTP3_H3_CONNECT_ERROR` is HTTP/3 application error code ``H3_CONNECT_ERROR``. .. macro:: NGHTTP3_H3_VERSION_FALLBACK :macro:`NGHTTP3_H3_VERSION_FALLBACK` is HTTP/3 application error code ``H3_VERSION_FALLBACK``. .. macro:: NGHTTP3_QPACK_DECOMPRESSION_FAILED :macro:`NGHTTP3_QPACK_DECOMPRESSION_FAILED` is HTTP/3 application error code ``QPACK_DECOMPRESSION_FAILED``. .. macro:: NGHTTP3_QPACK_ENCODER_STREAM_ERROR :macro:`NGHTTP3_QPACK_ENCODER_STREAM_ERROR` is HTTP/3 application error code ``QPACK_ENCODER_STREAM_ERROR``. .. macro:: NGHTTP3_QPACK_DECODER_STREAM_ERROR :macro:`NGHTTP3_QPACK_DECODER_STREAM_ERROR` is HTTP/3 application error code ``QPACK_DECODER_STREAM_ERROR``. Flags for HTTP field name/value pair ------------------------------------ .. macro:: NGHTTP3_NV_FLAG_NONE :macro:`NGHTTP3_NV_FLAG_NONE` indicates no flag set. .. macro:: NGHTTP3_NV_FLAG_NEVER_INDEX :macro:`NGHTTP3_NV_FLAG_NEVER_INDEX` indicates that this name/value pair must not be indexed. Other implementation calls this bit as "sensitive". .. macro:: NGHTTP3_NV_FLAG_NO_COPY_NAME :macro:`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. .. macro:: NGHTTP3_NV_FLAG_NO_COPY_VALUE :macro:`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. .. macro:: NGHTTP3_NV_FLAG_TRY_INDEX :macro:`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 ----------------------- .. macro:: NGHTTP3_QPACK_DECODE_FLAG_NONE :macro:`NGHTTP3_QPACK_DECODE_FLAG_NONE` indicates that no flag set. .. macro:: NGHTTP3_QPACK_DECODE_FLAG_EMIT :macro:`NGHTTP3_QPACK_DECODE_FLAG_EMIT` indicates that an HTTP field is successfully decoded. .. macro:: NGHTTP3_QPACK_DECODE_FLAG_FINAL :macro:`NGHTTP3_QPACK_DECODE_FLAG_FINAL` indicates that an entire HTTP field section has been decoded. .. macro:: NGHTTP3_QPACK_DECODE_FLAG_BLOCKED :macro:`NGHTTP3_QPACK_DECODE_FLAG_BLOCKED` indicates that decoding has been blocked. Shutdown related constants -------------------------- .. macro:: NGHTTP3_SHUTDOWN_NOTICE_STREAM_ID :macro:`NGHTTP3_SHUTDOWN_NOTICE_STREAM_ID` specifies stream ID sent by a server when it initiates graceful shutdown of the connection via `nghttp3_conn_submit_shutdown_notice`. .. macro:: NGHTTP3_SHUTDOWN_NOTICE_PUSH_ID :macro:`NGHTTP3_SHUTDOWN_NOTICE_PUSH_ID` specifies push ID sent by a client when it initiates graceful shutdown of the connection via `nghttp3_conn_submit_shutdown_notice`. Note that libnghttp3 does not implement HTTP/3 Server Push. Data flags ---------- .. macro:: NGHTTP3_DATA_FLAG_NONE :macro:`NGHTTP3_DATA_FLAG_NONE` indicates no flag set. .. macro:: NGHTTP3_DATA_FLAG_EOF :macro:`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 unless :macro:`NGHTTP3_DATA_FLAG_NO_END_STREAM` is given at the same time. .. macro:: NGHTTP3_DATA_FLAG_NO_END_STREAM :macro:`NGHTTP3_DATA_FLAG_NO_END_STREAM` indicates that sending side of stream is not closed even if :macro:`NGHTTP3_DATA_FLAG_EOF` is set. Usually this flag is used to send trailer fields with `nghttp3_conn_submit_trailers`. If `nghttp3_conn_submit_trailers` has been called, regardless of this flag, the submitted trailer fields are sent. HTTP stream priority flags -------------------------- .. macro:: NGHTTP3_DEFAULT_URGENCY :macro:`NGHTTP3_DEFAULT_URGENCY` is the default urgency level. .. macro:: NGHTTP3_URGENCY_HIGH :macro:`NGHTTP3_URGENCY_HIGH` is the highest urgency level. .. macro:: NGHTTP3_URGENCY_LOW :macro:`NGHTTP3_URGENCY_LOW` is the lowest urgency level. .. macro:: NGHTTP3_URGENCY_LEVELS :macro:`NGHTTP3_URGENCY_LEVELS` is the number of urgency levels. nghttp3_info flags ------------------ .. macro:: NGHTTP3_VERSION_AGE :macro:`NGHTTP3_VERSION_AGE` is the age of :type:`nghttp3_info`.