diff options
Diffstat (limited to 'src/event')
| -rw-r--r-- | src/event/ngx_event_quic.c | 11 | ||||
| -rw-r--r-- | src/event/ngx_event_quic.h | 1 |
2 files changed, 12 insertions, 0 deletions
diff --git a/src/event/ngx_event_quic.c b/src/event/ngx_event_quic.c index a7e474803..49ed8f7ba 100644 --- a/src/event/ngx_event_quic.c +++ b/src/event/ngx_event_quic.c @@ -5813,3 +5813,14 @@ ngx_quic_free_frame(ngx_connection_t *c, ngx_quic_frame_t *frame) "quic free frame n:%ui", qc->nframes); #endif } + + +uint32_t +ngx_quic_version(ngx_connection_t *c) +{ + uint32_t version; + + version = c->quic->version; + + return (version & 0xff000000) == 0xff000000 ? version & 0xff : version; +} diff --git a/src/event/ngx_event_quic.h b/src/event/ngx_event_quic.h index e8bf926a0..fc41e0ce6 100644 --- a/src/event/ngx_event_quic.h +++ b/src/event/ngx_event_quic.h @@ -122,6 +122,7 @@ void ngx_quic_run(ngx_connection_t *c, ngx_quic_conf_t *conf); ngx_connection_t *ngx_quic_open_stream(ngx_connection_t *c, ngx_uint_t bidi); void ngx_quic_finalize_connection(ngx_connection_t *c, ngx_uint_t err, const char *reason); +uint32_t ngx_quic_version(ngx_connection_t *c); /********************************* DEBUG *************************************/ |
