4 .. type:: nghttp2_error
7 Error codes used in this library. The code range is [-999, -500],
8 inclusive. The following values are defined:
10 .. macro:: NGHTTP2_ERR_INVALID_ARGUMENT
13 Invalid argument passed.
14 .. macro:: NGHTTP2_ERR_BUFFER_ERROR
18 .. macro:: NGHTTP2_ERR_UNSUPPORTED_VERSION
21 The specified protocol version is not supported.
22 .. macro:: NGHTTP2_ERR_WOULDBLOCK
25 Used as a return value from :type:`nghttp2_send_callback`,
26 :type:`nghttp2_recv_callback` and
27 :type:`nghttp2_send_data_callback` to indicate that the operation
29 .. macro:: NGHTTP2_ERR_PROTO
32 General protocol error
33 .. macro:: NGHTTP2_ERR_INVALID_FRAME
37 .. macro:: NGHTTP2_ERR_EOF
40 The peer performed a shutdown on the connection.
41 .. macro:: NGHTTP2_ERR_DEFERRED
44 Used as a return value from
45 :func:`nghttp2_data_source_read_callback` to indicate that data
46 transfer is postponed. See
47 :func:`nghttp2_data_source_read_callback` for details.
48 .. macro:: NGHTTP2_ERR_STREAM_ID_NOT_AVAILABLE
51 Stream ID has reached the maximum value. Therefore no stream ID
53 .. macro:: NGHTTP2_ERR_STREAM_CLOSED
56 The stream is already closed; or the stream ID is invalid.
57 .. macro:: NGHTTP2_ERR_STREAM_CLOSING
60 RST_STREAM has been added to the outbound queue. The stream is
62 .. macro:: NGHTTP2_ERR_STREAM_SHUT_WR
65 The transmission is not allowed for this stream (e.g., a frame
66 with END_STREAM flag set has already sent).
67 .. macro:: NGHTTP2_ERR_INVALID_STREAM_ID
70 The stream ID is invalid.
71 .. macro:: NGHTTP2_ERR_INVALID_STREAM_STATE
74 The state of the stream is not valid (e.g., DATA cannot be sent
75 to the stream if response HEADERS has not been sent).
76 .. macro:: NGHTTP2_ERR_DEFERRED_DATA_EXIST
79 Another DATA frame has already been deferred.
80 .. macro:: NGHTTP2_ERR_START_STREAM_NOT_ALLOWED
83 Starting new stream is not allowed (e.g., GOAWAY has been sent
85 .. macro:: NGHTTP2_ERR_GOAWAY_ALREADY_SENT
88 GOAWAY has already been sent.
89 .. macro:: NGHTTP2_ERR_INVALID_HEADER_BLOCK
92 The received frame contains the invalid header block (e.g., There
93 are duplicate header names; or the header names are not encoded
94 in US-ASCII character set and not lower cased; or the header name
95 is zero-length string; or the header value contains multiple
96 in-sequence NUL bytes).
97 .. macro:: NGHTTP2_ERR_INVALID_STATE
100 Indicates that the context is not suitable to perform the
102 .. macro:: NGHTTP2_ERR_TEMPORAL_CALLBACK_FAILURE
105 The user callback function failed due to the temporal error.
106 .. macro:: NGHTTP2_ERR_FRAME_SIZE_ERROR
109 The length of the frame is invalid, either too large or too small.
110 .. macro:: NGHTTP2_ERR_HEADER_COMP
113 Header block inflate/deflate error.
114 .. macro:: NGHTTP2_ERR_FLOW_CONTROL
118 .. macro:: NGHTTP2_ERR_INSUFF_BUFSIZE
121 Insufficient buffer size given to function.
122 .. macro:: NGHTTP2_ERR_PAUSE
125 Callback was paused by the application
126 .. macro:: NGHTTP2_ERR_TOO_MANY_INFLIGHT_SETTINGS
129 There are too many in-flight SETTING frame and no more
130 transmission of SETTINGS is allowed.
131 .. macro:: NGHTTP2_ERR_PUSH_DISABLED
134 The server push is disabled.
135 .. macro:: NGHTTP2_ERR_DATA_EXIST
138 DATA frame for a given stream has been already submitted and has
139 not been fully processed yet.
140 .. macro:: NGHTTP2_ERR_SESSION_CLOSING
143 The current session is closing due to a connection error or
144 `nghttp2_session_terminate_session()` is called.
145 .. macro:: NGHTTP2_ERR_HTTP_HEADER
148 Invalid HTTP header field was received and stream is going to be
150 .. macro:: NGHTTP2_ERR_HTTP_MESSAGING
153 Violation in HTTP messaging rule.
154 .. macro:: NGHTTP2_ERR_REFUSED_STREAM
158 .. macro:: NGHTTP2_ERR_INTERNAL
161 Unexpected internal error, but recovered.
162 .. macro:: NGHTTP2_ERR_FATAL
165 The errors < :macro:`NGHTTP2_ERR_FATAL` mean that the library is
166 under unexpected condition and processing was terminated (e.g.,
167 out of memory). If application receives this error code, it must
168 stop using that :type:`nghttp2_session` object and only allowed
169 operation for that object is deallocate it using
170 `nghttp2_session_del()`.
171 .. macro:: NGHTTP2_ERR_NOMEM
174 Out of memory. This is a fatal error.
175 .. macro:: NGHTTP2_ERR_CALLBACK_FAILURE
178 The user callback function failed. This is a fatal error.
179 .. macro:: NGHTTP2_ERR_BAD_CLIENT_MAGIC
182 Invalid client magic (see :macro:`NGHTTP2_CLIENT_MAGIC`) was
183 received and further processing is not possible.
185 .. type:: nghttp2_nv_flag
188 The flags for header field name/value pair.
190 .. macro:: NGHTTP2_NV_FLAG_NONE
194 .. macro:: NGHTTP2_NV_FLAG_NO_INDEX
197 Indicates that this name/value pair must not be indexed ("Literal
198 Header Field never Indexed" representation must be used in HPACK
199 encoding). Other implementation calls this bit as "sensitive".
201 .. type:: nghttp2_frame_type
204 The frame types in HTTP/2 specification.
206 .. macro:: NGHTTP2_DATA
210 .. macro:: NGHTTP2_HEADERS
214 .. macro:: NGHTTP2_PRIORITY
218 .. macro:: NGHTTP2_RST_STREAM
221 The RST_STREAM frame.
222 .. macro:: NGHTTP2_SETTINGS
226 .. macro:: NGHTTP2_PUSH_PROMISE
229 The PUSH_PROMISE frame.
230 .. macro:: NGHTTP2_PING
234 .. macro:: NGHTTP2_GOAWAY
238 .. macro:: NGHTTP2_WINDOW_UPDATE
241 The WINDOW_UPDATE frame.
242 .. macro:: NGHTTP2_CONTINUATION
245 The CONTINUATION frame. This frame type won't be passed to any
246 callbacks because the library processes this frame type and its
247 preceding HEADERS/PUSH_PROMISE as a single frame.
249 .. type:: nghttp2_flag
252 The flags for HTTP/2 frames. This enum defines all flags for all
255 .. macro:: NGHTTP2_FLAG_NONE
259 .. macro:: NGHTTP2_FLAG_END_STREAM
263 .. macro:: NGHTTP2_FLAG_END_HEADERS
266 The END_HEADERS flag.
267 .. macro:: NGHTTP2_FLAG_ACK
271 .. macro:: NGHTTP2_FLAG_PADDED
275 .. macro:: NGHTTP2_FLAG_PRIORITY
280 .. type:: nghttp2_settings_id
284 .. macro:: NGHTTP2_SETTINGS_HEADER_TABLE_SIZE
287 SETTINGS_HEADER_TABLE_SIZE
288 .. macro:: NGHTTP2_SETTINGS_ENABLE_PUSH
292 .. macro:: NGHTTP2_SETTINGS_MAX_CONCURRENT_STREAMS
295 SETTINGS_MAX_CONCURRENT_STREAMS
296 .. macro:: NGHTTP2_SETTINGS_INITIAL_WINDOW_SIZE
299 SETTINGS_INITIAL_WINDOW_SIZE
300 .. macro:: NGHTTP2_SETTINGS_MAX_FRAME_SIZE
303 SETTINGS_MAX_FRAME_SIZE
304 .. macro:: NGHTTP2_SETTINGS_MAX_HEADER_LIST_SIZE
307 SETTINGS_MAX_HEADER_LIST_SIZE
309 .. type:: nghttp2_error_code
311 The status codes for the RST_STREAM and GOAWAY frames.
313 .. macro:: NGHTTP2_NO_ERROR
317 .. macro:: NGHTTP2_PROTOCOL_ERROR
321 .. macro:: NGHTTP2_INTERNAL_ERROR
325 .. macro:: NGHTTP2_FLOW_CONTROL_ERROR
329 .. macro:: NGHTTP2_SETTINGS_TIMEOUT
333 .. macro:: NGHTTP2_STREAM_CLOSED
337 .. macro:: NGHTTP2_FRAME_SIZE_ERROR
341 .. macro:: NGHTTP2_REFUSED_STREAM
345 .. macro:: NGHTTP2_CANCEL
349 .. macro:: NGHTTP2_COMPRESSION_ERROR
353 .. macro:: NGHTTP2_CONNECT_ERROR
357 .. macro:: NGHTTP2_ENHANCE_YOUR_CALM
361 .. macro:: NGHTTP2_INADEQUATE_SECURITY
365 .. macro:: NGHTTP2_HTTP_1_1_REQUIRED
370 .. type:: nghttp2_data_flag
373 The flags used to set in *data_flags* output parameter in
374 :type:`nghttp2_data_source_read_callback`.
376 .. macro:: NGHTTP2_DATA_FLAG_NONE
380 .. macro:: NGHTTP2_DATA_FLAG_EOF
383 Indicates EOF was sensed.
384 .. macro:: NGHTTP2_DATA_FLAG_NO_END_STREAM
387 Indicates that END_STREAM flag must not be set even if
388 NGHTTP2_DATA_FLAG_EOF is set. Usually this flag is used to send
389 trailer header fields with `nghttp2_submit_request()` or
390 `nghttp2_submit_response()`.
391 .. macro:: NGHTTP2_DATA_FLAG_NO_COPY
394 Indicates that application will send complete DATA frame in
395 :type:`nghttp2_send_data_callback`.
397 .. type:: nghttp2_headers_category
400 The category of HEADERS, which indicates the role of the frame. In
401 HTTP/2 spec, request, response, push response and other arbitrary
402 headers (e.g., trailers) are all called just HEADERS. To give the
403 application the role of incoming HEADERS frame, we define several
406 .. macro:: NGHTTP2_HCAT_REQUEST
409 The HEADERS frame is opening new stream, which is analogous to
411 .. macro:: NGHTTP2_HCAT_RESPONSE
414 The HEADERS frame is the first response headers, which is
415 analogous to SYN_REPLY in SPDY.
416 .. macro:: NGHTTP2_HCAT_PUSH_RESPONSE
419 The HEADERS frame is the first headers sent against reserved
421 .. macro:: NGHTTP2_HCAT_HEADERS
424 The HEADERS frame which does not apply for the above categories,
425 which is analogous to HEADERS in SPDY. If non-final response
426 (e.g., status 1xx) is used, final response HEADERS frame will be
429 .. type:: nghttp2_hd_inflate_flag
432 The flags for header inflation.
434 .. macro:: NGHTTP2_HD_INFLATE_NONE
438 .. macro:: NGHTTP2_HD_INFLATE_FINAL
441 Indicates all headers were inflated.
442 .. macro:: NGHTTP2_HD_INFLATE_EMIT
445 Indicates a header was emitted.