Types (structs, unions and typedefs) ==================================== .. type:: ptrdiff_t nghttp2_ssize :type:`nghttp2_ssize` is signed counterpart of size_t. .. type:: void *(*nghttp2_malloc)(size_t size, void *user_data) :type:`nghttp2_malloc` is a custom memory allocator to replace :manpage:`malloc(3)`. The *user_data* is :member:`nghttp2_mem.user_data`. .. type:: void (*nghttp2_free)(void *ptr, void *user_data) :type:`nghttp2_free` is a custom memory allocator to replace :manpage:`free(3)`. The *user_data* is :member:`nghttp2_mem.user_data`. .. type:: void *(*nghttp2_calloc)(size_t nmemb, size_t size, void *user_data) :type:`nghttp2_calloc` is a custom memory allocator to replace :manpage:`calloc(3)`. The *user_data* is the :member:`nghttp2_mem.user_data`. .. type:: void *(*nghttp2_realloc)(void *ptr, size_t size, void *user_data) :type:`nghttp2_realloc` is a custom memory allocator to replace :manpage:`realloc(3)`. The *user_data* is the :member:`nghttp2_mem.user_data`. .. type:: nghttp2_mem :type:`nghttp2_mem` is a custom memory allocator. The :member:`user_data` field is passed to each allocator function. This can be used, for example, to achieve per-connection memory pool. In the following example code, ``my_malloc``, ``my_free``, ``my_calloc`` and ``my_realloc`` are the replacement of the standard allocators :manpage:`malloc(3)`, :manpage:`free(3)`, :manpage:`calloc(3)` and :manpage:`realloc(3)` respectively:: void *my_malloc_cb(size_t size, void *user_data) { (void)user_data; return my_malloc(size); } void my_free_cb(void *ptr, void *user_data) { (void)user_data; my_free(ptr); } void *my_calloc_cb(size_t nmemb, size_t size, void *user_data) { (void)user_data; return my_calloc(nmemb, size); } void *my_realloc_cb(void *ptr, size_t size, void *user_data) { (void)user_data; return my_realloc(ptr, size); } void conn_new() { nghttp2_mem mem = { .malloc = my_malloc_cb, .free = my_free_cb, .calloc = my_calloc_cb, .realloc = my_realloc_cb, }; ... } .. member:: void *user_data :member:`user_data` is an arbitrary user supplied data. This is passed to each allocator function. .. member:: nghttp2_malloc malloc :member:`malloc` is a custom allocator function to replace :manpage:`malloc(3)`. .. member:: nghttp2_free free :member:`free` is a custom allocator function to replace :manpage:`free(3)`. .. member:: nghttp2_calloc calloc :member:`calloc` is a custom allocator function to replace :manpage:`calloc(3)`. .. member:: nghttp2_realloc realloc :member:`realloc` is a custom allocator function to replace :manpage:`realloc(3)`. .. type:: nghttp2_vec :type:`nghttp2_vec` is struct iovec compatible structure to reference arbitrary array of bytes. .. member:: uint8_t *base :member:`base` points to the data. .. member:: size_t len :member:`len` is the number of bytes which the buffer pointed by base contains. .. type:: uint64_t nghttp2_tstamp :type:`nghttp2_tstamp` is a timestamp with nanosecond resolution. ``UINT64_MAX`` is an invalid value, and it is often used to indicate that no value is set. .. type:: uint64_t nghttp2_duration :type:`nghttp2_duration` is a period of time in nanosecond resolution. ``UINT64_MAX`` is an invalid value, and it is often used to indicate that no value is set. .. type:: nghttp2_rcbuf :type:`nghttp2_rcbuf` is the object representing reference counted buffer. The details of this structure are intentionally hidden from the public API. .. type:: nghttp2_buf :type:`nghttp2_buf` is the variable size buffer. .. member:: uint8_t *begin :member:`begin` points to the beginning of the buffer. .. member:: uint8_t *end :member:`end` points to the one beyond of the last byte of the buffer .. member:: uint8_t *pos :member:`pos` points to the start of data. Typically, this points to the address that next data should be read. Initially, it points to :member:`begin`. .. member:: uint8_t *last :member:`last` points to the one beyond of the last data of the buffer. Typically, new data is written at this point. Initially, it points to :member:`begin`. .. type:: nghttp2_nv :type:`nghttp2_nv` is the name/value pair, which mainly used to represent HTTP fields. .. member:: const uint8_t *name :member:`name` is the HTTP field name. .. member:: const uint8_t *value :member:`value` is the HTTP field value. .. member:: size_t namelen :member:`namelen` is the length of the *name*, excluding terminating ``NULL``. .. member:: size_t valuelen :member:`valuelen` is the length of the *value*, excluding terminating ``NULL``. .. member:: uint8_t flags :member:`flags` is bitwise OR of one or more of :macro:`NGHTTP2_NV_FLAG_* `. .. type:: nghttp2_hpack_nv :type:`nghttp2_hpack_nv` represents HTTP field name/value pair just like :type:`nghttp2_nv`. It is an extended version of :type:`nghttp2_nv`, and has reference counted buffers and tokens. .. member:: nghttp2_rcbuf *name :member:`name` is the buffer containing HTTP field name. NULL-termination is guaranteed. .. member:: nghttp2_rcbuf *value :member:`value` is the buffer containing HTTP field value. NULL-termination is guaranteed. .. member:: int32_t token :member:`token` is :type:`nghttp2_hpack_token` value of :member:`name`. It could be -1 if we have no token for that HTTP field name. .. member:: uint8_t flags :member:`flags` is a bitwise OR of one or more of :macro:`NGHTTP2_NV_FLAG_* `. .. type:: nghttp2_conn :type:`nghttp2_conn` represents a single HTTP/2 connection. .. type:: void (*nghttp2_log_write)(void *user_data, char *msg, size_t len) :type:`nghttp2_log_write` is a callback function for logging. *user_data* is the same object passed to `nghttp2_conn_client_new` or `nghttp2_conn_server_new`. The caller guarantees that the memory region [*msg*, *msg* + *len*], inclusive, are writable, and *msg*[*len*] == '\0'. If application needs to emit a single line with a line terminator, one can do msg[len] = '\n', and write *len* + 1 bytes from *msg*. .. type:: nghttp2_settings_entry :type:`nghttp2_settings_entry` contains the SETTINGS ID and its value. .. member:: uint16_t id :member:`id` is the SETTINGS ID. .. member:: uint32_t value :member:`value` is the SETTINGS value. .. type:: nghttp2_settings :type:`nghttp2_settings` defines HTTP/2 connection settings. .. member:: uint64_t conn_id :member:`conn_id` is the identifier of this connection. Currently, it is used in a log header so that people can distinguish the particular connection from the others. .. member:: nghttp2_tstamp initial_ts :member:`initial_ts` is an initial timestamp given to the library. This should be set to the current timestamp. .. member:: nghttp2_log_write log_write :member:`log_write` is the callback function when a single log message is emitted. If this field is ``NULL``, logging is disabled. .. member:: nghttp2_duration settings_timeout :member:`settings_timeout` is the timeout before receiving SETTINGS frame with ACK flag set. Setting ``UINT64_MAX`` disables timeout. .. member:: size_t hpack_max_dtable_capacity :member:`hpack_max_dtable_capacity` is the maximum size of HPACK dynamic table. .. member:: size_t hpack_encoder_max_dtable_capacity :member:`hpack_encoder_max_dtable_capacity` is the upper bound of HPACK dynamic table capacity that the HPACK encoder is willing to use. The effective maximum dynamic table capacity is the minimum of this field and the value of the received ``SETTINGS_HEADER_TABLE_SIZE``. If this field is set to 0, the encoder does not use the dynamic table. .. member:: size_t max_concurrent_streams_local :member:`max_concurrent_streams_local` is the number of concurrent streams that a local endpoint can open until the actual limit is known. When SETTINGS frame is received from the remote endpoint, and if ``SETTINGS_MAX_CONCURRENT_STREAMS`` is not included in the frame, the limit is unchanged because the unlimited concurrent stream is insane. .. member:: size_t max_concurrent_streams_remote :member:`max_concurrent_streams_remote` is the number of concurrent streams that a remote endpoint can open. .. member:: size_t initial_max_stream_data :member:`initial_max_stream_data` is the window size for stream-level flow control. .. member:: size_t initial_max_data :member:`initial_max_data` is the window size for connection-level flow control. .. member:: uint8_t enable_connect_protocol :member:`enable_connect_protocol`, if set to nonzero, enables Extended CONNECT Method (see :rfc:`8441`). Client ignores this field. .. member:: const nghttp2_settings_entry *extra_settings :member:`extra_settings` points to the array that contains the extra SETTINGS entries to be sent to the remote endpoint. The number of elements is specified by :member:`extra_settingslen`. The maximum number of elements is :macro:`NGHTTP2_MAX_EXTRA_SETTINGS`. The excess elements are discarded. The library does not perform any validations and just sends them as is. Therefore, the application must be cautious not to specify SETTINGS that are handled by the library. It is best to use this field for the experimental and testing purposes only. When :type:`nghttp2_settings` is passed to `nghttp2_conn_server_new` or `nghttp2_conn_client_new`, they make a copy of all elements pointed by this field. .. member:: size_t extra_settingslen :member:`extra_settingslen` specifies the number of elements contained in :member:`extra_settings`. .. member:: uint64_t glitch_ratelim_burst :member:`glitch_ratelim_burst` is the maximum number of tokens available to "glitch" rate limiter. It is clamped to ``UINT64_MAX`` / :macro:`NGHTTP2_SECONDS`. "glitch" is a suspicious activity from a remote endpoint. If detected, certain amount of tokens are consumed. If no tokens are available to consume, the connection is closed. The rate of token generation is specified by :member:`glitch_ratelim_rate`. .. member:: uint64_t glitch_ratelim_rate :member:`glitch_ratelim_rate` is the number of tokens generated per second. See :member:`glitch_ratelim_burst` for "glitch" rate limiter. .. type:: nghttp2_proto_settings :type:`nghttp2_proto_settings` contains HTTP/2 settings that this library can recognize. .. member:: size_t hpack_max_dtable_capacity :member:`hpack_max_dtable_capacity` is the maximum size of HPACK dynamic table. It corresponds to ``SETTINGS_HEADER_TABLE_SIZE``. .. member:: size_t max_concurrent_streams :member:`max_concurrent_streams` is the maximum number of the concurrent streams that the receiver can open. It corresponds to ``SETTINGS_MAX_CONCURRENT_STREAMS``. .. member:: size_t initial_max_stream_data :member:`initial_max_stream_data` is the initial window size of stream-level flow control. It corresponds to ``SETTINGS_INITIAL_WINDOW_SIZE``. .. member:: size_t max_field_section_size :member:`max_field_section_size` specifies the maximum header section (block) size. It corresponds to ``SETTINGS_MAX_HEADER_LIST_SIZE``. .. member:: uint8_t enable_connect_protocol :member:`enable_connect_protocol`, if set to nonzero, enables Extended CONNECT Method (see :rfc:`8441`). Client ignores this field. .. type:: int (*nghttp2_recv_settings_entry)(nghttp2_conn *conn, const nghttp2_settings_entry *ent, void *conn_user_data) :type:`nghttp2_recv_settings_entry` is a callback function which is invoked when each SETTINGS entry is received. *ent* contains the received SETTINGS entry. The implementation of this callback must return 0 if it succeeds. Returning :macro:`NGHTTP2_ERR_CALLBACK_FAILURE` will return to the caller immediately. Any values other than 0 is treated as :macro:`NGHTTP2_ERR_CALLBACK_FAILURE`. .. type:: int (*nghttp2_recv_settings)(nghttp2_conn *conn, const nghttp2_proto_settings *settings, void *conn_user_data) :type:`nghttp2_recv_settings` is a callback function which is invoked when SETTINGS frame is received. *settings* is a received remote HTTP/2 settings. The implementation of this callback must return 0 if it succeeds. Returning :macro:`NGHTTP2_ERR_CALLBACK_FAILURE` will return to the caller immediately. Any values other than 0 is treated as :macro:`NGHTTP2_ERR_CALLBACK_FAILURE`. .. type:: int (*nghttp2_recv_settings_ack)(nghttp2_conn *conn, void *conn_user_data) :type:`nghttp2_recv_settings_ack` is a callback function which is invoked when SETTINGS frame with ACK flag set is received. The implementation of this callback must return 0 if it succeeds. Returning :macro:`NGHTTP2_ERR_CALLBACK_FAILURE` will return to the caller immediately. Any values other than 0 is treated as :macro:`NGHTTP2_ERR_CALLBACK_FAILURE`. .. type:: int (*nghttp2_stream_open)(nghttp2_conn *conn, int64_t stream_id, void *conn_user_data) :type:`nghttp2_stream_open` is a callback function which is called when remote stream is opened by a remote endpoint. This function is not called if stream is opened by implicitly (we might reconsider this behaviour later). The implementation of this callback should return 0 if it succeeds. Returning :macro:`NGHTTP2_ERR_CALLBACK_FAILURE` makes the library call return immediately. .. type:: int (*nghttp2_stream_close)(nghttp2_conn *conn, uint32_t flags, int64_t stream_id, uint32_t error_code, void *conn_user_data, void *stream_user_data) :type:`nghttp2_stream_close` is invoked when a stream is closed. This callback is not called when HTTP/2 connection is closed before existing streams are closed. *flags* is the bitwise-OR of zero or more of :macro:`NGHTTP2_STREAM_CLOSE_FLAG_* `. *error_code* indicates the error code that shut down this stream if :macro:`NGHTTP2_STREAM_CLOSE_FLAG_ERROR_CODE_SET` is set in *flags*. No error code means that a stream is closed cleanly. The implementation of this callback should return 0 if it succeeds. Returning :macro:`NGHTTP2_ERR_CALLBACK_FAILURE` makes the library call return immediately. .. type:: void (*nghttp2_rand)(uint8_t *dest, size_t destlen) :type:`nghttp2_rand` is a callback function which is invoked when unpredictable data of *destlen* bytes are needed. The implementation must write unpredictable data of *destlen* bytes into the buffer pointed by *dest*. .. type:: int (*nghttp2_write_stream_data_offset)(nghttp2_conn *conn, int64_t stream_id, uint64_t offset, size_t len, void *conn_user_data, void *stream_user_data) :type:`nghttp2_write_stream_data_offset` is a callback function which is invoked when the stream data is written to DATA frame. *stream_id* identifies the stream. *offset* is the starting offset of the stream data. *len* is the length of the stream data. The callback function must return 0 if it succeeds. Returning :macro:`NGHTTP2_ERR_CALLBACK_FAILURE` makes the library call return immediately. .. type:: int (*nghttp2_begin_fields)(nghttp2_conn *conn, int64_t stream_id, void *conn_user_data, void *stream_user_data) :type:`nghttp2_begin_fields` is a callback function which is invoked when an incoming HTTP field section is started on a stream denoted by *stream_id*. Each HTTP field is passed to application by :type:`nghttp2_recv_field` callback. And then :type:`nghttp2_end_fields` is called when a whole HTTP field section is processed. The implementation of this callback must return 0 if it succeeds. Returning :macro:`NGHTTP2_ERR_CALLBACK_FAILURE` will return to the caller immediately. Any values other than 0 is treated as :macro:`NGHTTP2_ERR_CALLBACK_FAILURE`. .. type:: int (*nghttp2_recv_field)(nghttp2_conn *conn, int64_t stream_id, int32_t token, nghttp2_rcbuf *name, nghttp2_rcbuf *value, uint8_t flags, void *conn_user_data, void *stream_user_data) :type:`nghttp2_recv_field` is a callback function which is invoked when an HTTP field is received on a stream denoted by *stream_id*. *name* contains a field name, and *value* contains a field value. *token* is one of token defined in :type:`nghttp2_hpack_token` or -1 if no token is defined for *name*. *flags* is bitwise OR of zero or more of :macro:`NGHTTP2_NV_FLAG_* `. The buffers for *name* and *value* are reference counted. If application needs to keep them, increment the reference count with `nghttp2_rcbuf_incref`. When they are no longer used, call `nghttp2_rcbuf_decref`. The implementation of this callback must return 0 if it succeeds. Returning :macro:`NGHTTP2_ERR_CALLBACK_FAILURE` will return to the caller immediately. Any values other than 0 is treated as :macro:`NGHTTP2_ERR_CALLBACK_FAILURE`. .. type:: int (*nghttp2_end_fields)(nghttp2_conn *conn, int64_t stream_id, int fin, void *conn_user_data, void *stream_user_data) :type:`nghttp2_end_fields` is a callback function which is invoked when an incoming HTTP field section has ended. If the stream ends with this HTTP field section, *fin* is set to nonzero. The implementation of this callback must return 0 if it succeeds. Returning :macro:`NGHTTP2_ERR_CALLBACK_FAILURE` will return to the caller immediately. Any values other than 0 is treated as :macro:`NGHTTP2_ERR_CALLBACK_FAILURE`. .. type:: int (*nghttp2_recv_data)(nghttp2_conn *conn, int64_t stream_id, const uint8_t *data, size_t datalen, void *conn_user_data, void *stream_user_data) :type:`nghttp2_recv_data` is a callback function which is invoked when a part of request or response body on stream identified by *stream_id* is received. *data* points to the received data, and its length is *datalen*. The application is responsible for increasing flow control credit (say, increasing by *datalen* bytes). The implementation of this callback must return 0 if it succeeds. Returning :macro:`NGHTTP2_ERR_CALLBACK_FAILURE` will return to the caller immediately. Any values other than 0 is treated as :macro:`NGHTTP2_ERR_CALLBACK_FAILURE`. .. type:: int (*nghttp2_end_stream)(nghttp2_conn *conn, int64_t stream_id, void *conn_user_data, void *stream_user_data) :type:`nghttp2_end_stream` is a callback function which is invoked when the one side of stream is closed. The implementation of this callback must return 0 if it succeeds. Returning :macro:`NGHTTP2_ERR_CALLBACK_FAILURE` will return to the caller immediately. Any values other than 0 is treated as :macro:`NGHTTP2_ERR_CALLBACK_FAILURE`. .. type:: int (*nghttp2_recv_ping_ack)(nghttp2_conn *conn, const nghttp2_ping_data *data, nghttp2_duration rtt, void *conn_user_data) :type:`nghttp2_recv_ping_ack` is a callback function which is invoked when PING with ACK flag set is received. *data* contains the data received with PING frame. This is the data that the local endpoint sent to the remote endpoint. The data is 8 bytes long. *rtt* is the round trip time between the transmission of PING frame and the reception of its acknowledgement. The implementation of this callback must return 0 if it succeeds. Returning :macro:`NGHTTP2_ERR_CALLBACK_FAILURE` will return to the caller immediately. Any values other than 0 is treated as :macro:`NGHTTP2_ERR_CALLBACK_FAILURE`. .. type:: int (*nghttp2_shutdown)(nghttp2_conn *conn, int64_t last_stream_id, uint32_t error_code, void *conn_user_data) :type:`nghttp2_shutdown` is a callback function which is invoked when a shutdown is initiated by the remote endpoint. For client, *last_stream_id* contains a stream ID of a client initiated stream, for server, it contains a stream ID of server push. All client streams with stream ID larger than *last_stream_id* are guaranteed not to be processed by the remote endpoint. Because libnghttp2 does not implement Server Push, the server should ignore *last_stream_id*. It is possible that this callback is invoked multiple times on a single connection, however the *last_stream_id* can only stay the same or decrease, never increase. The implementation of this callback must return 0 if it succeeds. Returning :macro:`NGHTTP2_ERR_CALLBACK_FAILURE` will return to the caller immediately. Any values other than 0 is treated as :macro:`NGHTTP2_ERR_CALLBACK_FAILURE`. .. type:: nghttp2_callbacks :type:`nghttp2_callbacks` holds a set of callback functions. .. member:: nghttp2_rand rand :member:`rand` is a callback function which is invoked when the library needs random data. This callback function must be specified. .. member:: nghttp2_recv_settings_entry recv_settings_entry :member:`recv_settings_entry` is a callback function which is invoked when SETTINGS entry is received from the remote endpoint. This callback function is optional. .. member:: nghttp2_recv_settings recv_settings :member:`recv_settings` is a callback function which is invoked when SETTINGS frame is received from the remote endpoint. This callback function is optional. .. member:: nghttp2_recv_settings_ack recv_settings_ack :member:`recv_settings_ack` is a callback function which is invoked when SETTINGS frame with ACK flag set is received from the remote endpoint. This callback function is optional. .. member:: nghttp2_stream_open stream_open :member:`stream_open` is a callback function which is invoked when new remote stream is opened by a remote endpoint. This callback function is optional. .. member:: nghttp2_stream_close stream_close :member:`stream_close` is a callback function which is invoked when a stream is closed. This callback function is optional. .. member:: nghttp2_write_stream_data_offset write_stream_data_offset :member:`write_stream_data_offset` is a callback function which is invoked when the stream data is written. This callback function is optional. .. member:: nghttp2_begin_fields begin_headers :member:`begin_headers` is a callback function which is invoked when an HTTP header field section has started on a particular stream. This callback function is optional. .. member:: nghttp2_recv_field recv_header :member:`recv_header` is a callback function which is invoked when a single HTTP header field is received on a particular stream. This callback function is optional. .. member:: nghttp2_end_fields end_headers :member:`end_headers` is a callback function which is invoked when an HTTP header field section has ended on a particular stream. This callback function is optional. .. member:: nghttp2_begin_fields begin_trailers :member:`begin_trailers` is a callback function which is invoked when an HTTP trailer field section has started on a particular stream. This callback function is optional. .. member:: nghttp2_recv_field recv_trailer :member:`recv_trailer` is a callback function which is invoked when a single HTTP trailer field is received on a particular stream. This callback function is optional. .. member:: nghttp2_end_fields end_trailers :member:`end_trailers` is a callback function which is invoked when an HTTP trailer field section has ended on a particular stream. This callback function is optional. .. member:: nghttp2_recv_data recv_data :member:`recv_data` is a callback function which is invoked when stream data is received. This callback function is optional. .. member:: nghttp2_end_stream local_end_stream :member:`local_end_stream` is a callback function which is invoked when a sending side of stream has been closed. For server, this callback function is invoked when HTTP response is sent completely. For client, this callback function is invoked when HTTP request is sent completely. This callback function is optional. .. member:: nghttp2_end_stream remote_end_stream :member:`remote_end_stream` is a callback function which is invoked when a receiving side of stream has been closed. For server, this callback function is invoked when HTTP request is received completely. For client, this callback function is invoked when HTTP response is received completely. This callback function is optional. .. member:: nghttp2_recv_ping_ack recv_ping_ack :member:`recv_ping_ack` is a callback function which is invoked when PING frame with ACK flag set is received. This callback function is optional. .. member:: nghttp2_shutdown shutdown :member:`shutdown` is a callback function which is invoked when GOAWAY frame is received. This callback function is optional. .. type:: nghttp2_ssize (*nghttp2_read_data)(nghttp2_conn *conn, int64_t stream_id, nghttp2_vec *vec, size_t veccnt, uint32_t *pflags, void *conn_user_data, void *stream_user_data) :type:`nghttp2_read_data` is a callback function invoked when the library asks an application to provide stream data for a stream denoted by *stream_id*. The library provides *vec* of length *veccnt* to the application. The application should fill data and its length to *vec*. It has to return the number of the filled objects. The application must retain data until they are safe to free. It is notified by :type:`nghttp2_write_stream_data_offset` callback. If this is the last data to send (or there is no data to send because all data have been sent already), set :macro:`NGHTTP2_READ_DATA_FLAG_EOF` to *\*pflags*. If the application is unable to provide data temporarily, return :macro:`NGHTTP2_ERR_WOULDBLOCK`. When it is ready to provide data, call `nghttp2_conn_resume_stream`. If the callback returns 0 or the sum of length in *vec* is 0, and :macro:`NGHTTP2_READ_DATA_FLAG_EOF` is not set in *\*pflags*, it is treated as if :macro:`NGHTTP2_ERR_CALLBACK_FAILURE` is returned. The callback should return the number of objects in *vec* that the application filled if it succeeds, or :macro:`NGHTTP2_ERR_CALLBACK_FAILURE`. .. type:: nghttp2_data_reader :type:`nghttp2_data_reader` specifies the way how to generate request or response body. .. member:: nghttp2_read_data read_data :member:`read_data` is a callback function to generate body. .. type:: nghttp2_pri :type:`nghttp2_pri` represents HTTP priority. .. member:: uint32_t urgency :member:`urgency` is the urgency of a stream, it must be in [:macro:`NGHTTP2_URGENCY_HIGH`, :macro:`NGHTTP2_URGENCY_LOW`], inclusive, and 0 is the highest urgency. .. member:: uint8_t inc :member:`inc` indicates that a content can be processed incrementally or not. If it is 0, it cannot be processed incrementally. If it is 1, it can be processed incrementally. Other value is not permitted. .. type:: nghttp2_hpack_encoder :type:`nghttp2_hpack_encoder` represents HPACK encoder. .. type:: nghttp2_hpack_decoder :type:`nghttp2_hpack_decoder` represents HPACK decoder.