diff options
| author | Vladimir Homutov <vl@nginx.com> | 2021-03-31 14:57:15 +0300 |
|---|---|---|
| committer | Vladimir Homutov <vl@nginx.com> | 2021-03-31 14:57:15 +0300 |
| commit | 79b66760a19599fa4b2cb3b9aa3c3e7e937df8ae (patch) | |
| tree | 325af26e1d57bbad96b52073c07360ba25d4fefe /src/event/quic/ngx_event_quic_connection.h | |
| parent | bd90c0ab796a3a321d17262c189bde334746acc3 (diff) | |
| download | nginx-79b66760a19599fa4b2cb3b9aa3c3e7e937df8ae.tar.gz nginx-79b66760a19599fa4b2cb3b9aa3c3e7e937df8ae.tar.bz2 | |
QUIC: distinct files for connection migration.
The connection migration-related code from quic.c with dependencies is moved
into separate file.
Diffstat (limited to 'src/event/quic/ngx_event_quic_connection.h')
| -rw-r--r-- | src/event/quic/ngx_event_quic_connection.h | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/src/event/quic/ngx_event_quic_connection.h b/src/event/quic/ngx_event_quic_connection.h index 298857a83..acbec5133 100644 --- a/src/event/quic/ngx_event_quic_connection.h +++ b/src/event/quic/ngx_event_quic_connection.h @@ -19,6 +19,18 @@ typedef struct ngx_quic_connection_s ngx_quic_connection_t; +/* 0-RTT and 1-RTT data exist in the same packet number space, + * so we have 3 packet number spaces: + * + * 0 - Initial + * 1 - Handshake + * 2 - 0-RTT and 1-RTT + */ +#define ngx_quic_get_send_ctx(qc, level) \ + ((level) == ssl_encryption_initial) ? &((qc)->send_ctx[0]) \ + : (((level) == ssl_encryption_handshake) ? &((qc)->send_ctx[1]) \ + : &((qc)->send_ctx[2])) + typedef struct { ngx_queue_t queue; @@ -175,5 +187,6 @@ struct ngx_quic_connection_s { ngx_quic_frame_t *ngx_quic_alloc_frame(ngx_connection_t *c); void ngx_quic_queue_frame(ngx_quic_connection_t *qc, ngx_quic_frame_t *frame); void ngx_quic_close_connection(ngx_connection_t *c, ngx_int_t rc); +ngx_msec_t ngx_quic_pto(ngx_connection_t *c, ngx_quic_send_ctx_t *ctx); #endif |
