Mercurial > hg > nginx
comparison src/http/v3/ngx_http_v3.h @ 8283:dadbc66e9fca quic
Simplifed handling HTTP/3 streams.
author | Roman Arutyunyan <arut@nginx.com> |
---|---|
date | Wed, 25 Mar 2020 12:14:24 +0300 |
parents | c9c3a73df6e8 |
children | 46e3542d51b3 |
comparison
equal
deleted
inserted
replaced
8282:4cf00c14f11a | 8283:dadbc66e9fca |
---|---|
12 #include <ngx_config.h> | 12 #include <ngx_config.h> |
13 #include <ngx_core.h> | 13 #include <ngx_core.h> |
14 #include <ngx_http.h> | 14 #include <ngx_http.h> |
15 #include <ngx_http_v3_parse.h> | 15 #include <ngx_http_v3_parse.h> |
16 | 16 |
17 | |
18 #define NGX_HTTP_V3_STREAM 0x48335354 /* "H3ST" */ | |
19 | 17 |
20 #define NGX_HTTP_V3_ALPN(s) NGX_HTTP_V3_ALPN_DRAFT(s) | 18 #define NGX_HTTP_V3_ALPN(s) NGX_HTTP_V3_ALPN_DRAFT(s) |
21 #define NGX_HTTP_V3_ALPN_DRAFT(s) "\x05h3-" #s | 19 #define NGX_HTTP_V3_ALPN_DRAFT(s) "\x05h3-" #s |
22 #define NGX_HTTP_V3_ALPN_ADVERTISE NGX_HTTP_V3_ALPN(NGX_QUIC_DRAFT_VERSION) | 20 #define NGX_HTTP_V3_ALPN_ADVERTISE NGX_HTTP_V3_ALPN(NGX_QUIC_DRAFT_VERSION) |
23 | 21 |
39 | 37 |
40 #define NGX_HTTP_V3_PARAM_MAX_TABLE_CAPACITY 0x01 | 38 #define NGX_HTTP_V3_PARAM_MAX_TABLE_CAPACITY 0x01 |
41 #define NGX_HTTP_V3_PARAM_MAX_HEADER_LIST_SIZE 0x06 | 39 #define NGX_HTTP_V3_PARAM_MAX_HEADER_LIST_SIZE 0x06 |
42 #define NGX_HTTP_V3_PARAM_BLOCKED_STREAMS 0x07 | 40 #define NGX_HTTP_V3_PARAM_BLOCKED_STREAMS 0x07 |
43 | 41 |
42 #define NGX_HTTP_V3_STREAM_CLIENT_CONTROL 0 | |
43 #define NGX_HTTP_V3_STREAM_SERVER_CONTROL 1 | |
44 #define NGX_HTTP_V3_STREAM_CLIENT_ENCODER 2 | |
45 #define NGX_HTTP_V3_STREAM_SERVER_ENCODER 3 | |
46 #define NGX_HTTP_V3_STREAM_CLIENT_DECODER 4 | |
47 #define NGX_HTTP_V3_STREAM_SERVER_DECODER 5 | |
48 #define NGX_HTTP_V3_MAX_KNOWN_STREAM 6 | |
49 | |
44 | 50 |
45 typedef struct { | 51 typedef struct { |
46 ngx_quic_tp_t quic; | 52 ngx_quic_tp_t quic; |
47 } ngx_http_v3_srv_conf_t; | 53 } ngx_http_v3_srv_conf_t; |
48 | 54 |
49 | 55 |
50 typedef struct { | 56 typedef struct { |
51 ngx_http_connection_t hc; | 57 ngx_http_connection_t hc; |
52 | 58 |
53 ngx_array_t *dynamic; | 59 ngx_array_t *dynamic; |
54 | 60 ngx_connection_t *known_streams[NGX_HTTP_V3_MAX_KNOWN_STREAM]; |
55 ngx_connection_t *client_encoder; | |
56 ngx_connection_t *client_decoder; | |
57 ngx_connection_t *client_control; | |
58 | |
59 ngx_connection_t *server_encoder; | |
60 ngx_connection_t *server_decoder; | |
61 ngx_connection_t *server_control; | |
62 } ngx_http_v3_connection_t; | 61 } ngx_http_v3_connection_t; |
63 | 62 |
64 | 63 |
65 typedef struct { | 64 typedef struct { |
66 ngx_str_t name; | 65 ngx_str_t name; |