Mercurial > hg > nginx-quic
comparison src/http/v3/ngx_http_v3.h @ 8428:40d710a66aef quic
HTTP/3: ngx_http_v3_get_session() macro.
It's used instead of accessing c->quic->parent->data directly. Apart from being
simpler, it allows to change the way session is stored in the future by changing
the macro.
author | Roman Arutyunyan <arut@nginx.com> |
---|---|
date | Fri, 30 Apr 2021 19:10:11 +0300 |
parents | 47a43b011dec |
children | 9ec3e71f8a61 |
comparison
equal
deleted
inserted
replaced
8427:33ec97749b5f | 8428:40d710a66aef |
---|---|
71 /* QPACK errors */ | 71 /* QPACK errors */ |
72 #define NGX_HTTP_V3_ERR_DECOMPRESSION_FAILED 0x200 | 72 #define NGX_HTTP_V3_ERR_DECOMPRESSION_FAILED 0x200 |
73 #define NGX_HTTP_V3_ERR_ENCODER_STREAM_ERROR 0x201 | 73 #define NGX_HTTP_V3_ERR_ENCODER_STREAM_ERROR 0x201 |
74 #define NGX_HTTP_V3_ERR_DECODER_STREAM_ERROR 0x202 | 74 #define NGX_HTTP_V3_ERR_DECODER_STREAM_ERROR 0x202 |
75 | 75 |
76 | |
77 #define ngx_http_v3_get_session(c) \ | |
78 ((ngx_http_v3_connection_t *) (c)->quic->parent->data) | |
76 | 79 |
77 #define ngx_http_v3_get_module_loc_conf(c, module) \ | 80 #define ngx_http_v3_get_module_loc_conf(c, module) \ |
78 ngx_http_get_module_loc_conf( \ | 81 ngx_http_get_module_loc_conf( \ |
79 ((ngx_http_v3_connection_t *) c->quic->parent->data)->hc.conf_ctx, \ | 82 ((ngx_http_v3_connection_t *) c->quic->parent->data)->hc.conf_ctx, \ |
80 module) | 83 module) |