diff options
| author | Roman Arutyunyan <arut@nginx.com> | 2021-05-05 15:00:17 +0300 |
|---|---|---|
| committer | Roman Arutyunyan <arut@nginx.com> | 2021-05-05 15:00:17 +0300 |
| commit | 32f98ecbb13acc9c22db4dd7e9bec20eb30b945a (patch) | |
| tree | 50927ef303aa1746840b2f511ded98280ad8df8b /src/http/v3/ngx_http_v3_parse.h | |
| parent | 891fedf52d2c4a85e724e9abbb403334ec55c861 (diff) | |
| download | nginx-32f98ecbb13acc9c22db4dd7e9bec20eb30b945a.tar.gz nginx-32f98ecbb13acc9c22db4dd7e9bec20eb30b945a.tar.bz2 | |
HTTP/3: moved parsing uni stream type to ngx_http_v3_parse.c.
Previously it was parsed in ngx_http_v3_streams.c, while the streams were
parsed in ngx_http_v3_parse.c. Now all parsing is done in one file. This
simplifies parsing API and cleans up ngx_http_v3_streams.c.
Diffstat (limited to 'src/http/v3/ngx_http_v3_parse.h')
| -rw-r--r-- | src/http/v3/ngx_http_v3_parse.h | 17 |
1 files changed, 13 insertions, 4 deletions
diff --git a/src/http/v3/ngx_http_v3_parse.h b/src/http/v3/ngx_http_v3_parse.h index f039ac28d..c187b7bc2 100644 --- a/src/http/v3/ngx_http_v3_parse.h +++ b/src/http/v3/ngx_http_v3_parse.h @@ -108,6 +108,17 @@ typedef struct { typedef struct { ngx_uint_t state; + ngx_http_v3_parse_varlen_int_t vlint; + union { + ngx_http_v3_parse_encoder_t encoder; + ngx_http_v3_parse_decoder_t decoder; + ngx_http_v3_parse_control_t control; + } u; +} ngx_http_v3_parse_uni_t; + + +typedef struct { + ngx_uint_t state; ngx_uint_t type; ngx_uint_t length; ngx_http_v3_parse_varlen_int_t vlint; @@ -128,10 +139,8 @@ ngx_int_t ngx_http_v3_parse_headers(ngx_connection_t *c, ngx_http_v3_parse_headers_t *st, u_char ch); ngx_int_t ngx_http_v3_parse_data(ngx_connection_t *c, ngx_http_v3_parse_data_t *st, u_char ch); - -ngx_int_t ngx_http_v3_parse_control(ngx_connection_t *c, void *data, u_char ch); -ngx_int_t ngx_http_v3_parse_encoder(ngx_connection_t *c, void *data, u_char ch); -ngx_int_t ngx_http_v3_parse_decoder(ngx_connection_t *c, void *data, u_char ch); +ngx_int_t ngx_http_v3_parse_uni(ngx_connection_t *c, + ngx_http_v3_parse_uni_t *st, u_char ch); #endif /* _NGX_HTTP_V3_PARSE_H_INCLUDED_ */ |
