mirror of
https://github.com/nginx/nginx.git
synced 2025-07-26 07:06:55 +08:00
QUIC: optimized datagram expansion with half-RTT tickets.
As shown in RFC 8446, section 2.2, Figure 3, and further specified in section 4.6.1, BoringSSL releases session tickets in Application Data (along with Finished) early, based on a precalculated client Finished transcript, once client signalled early data in extensions.
This commit is contained in:
parent
a767450093
commit
1381932d27
@ -476,6 +476,7 @@ ngx_quic_send_segments(ngx_connection_t *c, u_char *buf, size_t len,
|
|||||||
static ngx_uint_t
|
static ngx_uint_t
|
||||||
ngx_quic_get_padding_level(ngx_connection_t *c)
|
ngx_quic_get_padding_level(ngx_connection_t *c)
|
||||||
{
|
{
|
||||||
|
ngx_uint_t i;
|
||||||
ngx_queue_t *q;
|
ngx_queue_t *q;
|
||||||
ngx_quic_frame_t *f;
|
ngx_quic_frame_t *f;
|
||||||
ngx_quic_send_ctx_t *ctx;
|
ngx_quic_send_ctx_t *ctx;
|
||||||
@ -499,13 +500,15 @@ ngx_quic_get_padding_level(ngx_connection_t *c)
|
|||||||
f = ngx_queue_data(q, ngx_quic_frame_t, queue);
|
f = ngx_queue_data(q, ngx_quic_frame_t, queue);
|
||||||
|
|
||||||
if (f->need_ack) {
|
if (f->need_ack) {
|
||||||
ctx = ngx_quic_get_send_ctx(qc, ssl_encryption_handshake);
|
for (i = 0; i + 1 < NGX_QUIC_SEND_CTX_LAST; i++) {
|
||||||
|
ctx = &qc->send_ctx[i + 1];
|
||||||
|
|
||||||
if (ngx_queue_empty(&ctx->frames)) {
|
if (ngx_queue_empty(&ctx->frames)) {
|
||||||
return 0;
|
break;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return 1;
|
return i;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user