Mercurial > hg > nginx
comparison src/event/ngx_event_quic.c @ 8369:bddf704d62c1 quic
Renamed retransmit event object in preparation for retry support.
author | Sergey Kandaurov <pluknet@nginx.com> |
---|---|
date | Wed, 29 Apr 2020 14:59:21 +0300 |
parents | 89ccb04736b9 |
children | 262396242352 |
comparison
equal
deleted
inserted
replaced
8368:89ccb04736b9 | 8369:bddf704d62c1 |
---|---|
101 ngx_quic_frames_stream_t crypto[NGX_QUIC_ENCRYPTION_LAST]; | 101 ngx_quic_frames_stream_t crypto[NGX_QUIC_ENCRYPTION_LAST]; |
102 | 102 |
103 ngx_ssl_t *ssl; | 103 ngx_ssl_t *ssl; |
104 | 104 |
105 ngx_event_t push; | 105 ngx_event_t push; |
106 ngx_event_t retry; | 106 ngx_event_t retransmit; |
107 ngx_event_t close; | 107 ngx_event_t close; |
108 ngx_queue_t free_frames; | 108 ngx_queue_t free_frames; |
109 ngx_msec_t last_cc; | 109 ngx_msec_t last_cc; |
110 | 110 |
111 #if (NGX_DEBUG) | 111 #if (NGX_DEBUG) |
584 ngx_queue_init(&qc->crypto[i].frames); | 584 ngx_queue_init(&qc->crypto[i].frames); |
585 } | 585 } |
586 | 586 |
587 ngx_queue_init(&qc->free_frames); | 587 ngx_queue_init(&qc->free_frames); |
588 | 588 |
589 qc->retry.log = c->log; | 589 qc->retransmit.log = c->log; |
590 qc->retry.data = c; | 590 qc->retransmit.data = c; |
591 qc->retry.handler = ngx_quic_retransmit_handler; | 591 qc->retransmit.handler = ngx_quic_retransmit_handler; |
592 qc->retry.cancelable = 1; | 592 qc->retransmit.cancelable = 1; |
593 | 593 |
594 qc->push.log = c->log; | 594 qc->push.log = c->log; |
595 qc->push.data = c; | 595 qc->push.data = c; |
596 qc->push.handler = ngx_quic_push_handler; | 596 qc->push.handler = ngx_quic_push_handler; |
597 qc->push.cancelable = 1; | 597 qc->push.cancelable = 1; |
961 | 961 |
962 if (qc->push.timer_set) { | 962 if (qc->push.timer_set) { |
963 ngx_del_timer(&qc->push); | 963 ngx_del_timer(&qc->push); |
964 } | 964 } |
965 | 965 |
966 if (qc->retry.timer_set) { | 966 if (qc->retransmit.timer_set) { |
967 ngx_del_timer(&qc->retry); | 967 ngx_del_timer(&qc->retransmit); |
968 } | 968 } |
969 | 969 |
970 ngx_log_debug0(NGX_LOG_DEBUG_EVENT, c->log, 0, | 970 ngx_log_debug0(NGX_LOG_DEBUG_EVENT, c->log, 0, |
971 "quic part of connection is terminated"); | 971 "quic part of connection is terminated"); |
972 | 972 |
2447 if (!qc->send_timer_set && !qc->closing) { | 2447 if (!qc->send_timer_set && !qc->closing) { |
2448 qc->send_timer_set = 1; | 2448 qc->send_timer_set = 1; |
2449 ngx_add_timer(c->read, qc->tp.max_idle_timeout); | 2449 ngx_add_timer(c->read, qc->tp.max_idle_timeout); |
2450 } | 2450 } |
2451 | 2451 |
2452 if (!qc->retry.timer_set && !qc->closing) { | 2452 if (!qc->retransmit.timer_set && !qc->closing) { |
2453 ngx_add_timer(&qc->retry, qc->tp.max_ack_delay); | 2453 ngx_add_timer(&qc->retransmit, qc->tp.max_ack_delay); |
2454 } | 2454 } |
2455 | 2455 |
2456 return NGX_OK; | 2456 return NGX_OK; |
2457 } | 2457 } |
2458 | 2458 |
2762 wait = nswait; | 2762 wait = nswait; |
2763 } | 2763 } |
2764 } | 2764 } |
2765 | 2765 |
2766 if (wait > 0) { | 2766 if (wait > 0) { |
2767 ngx_add_timer(&qc->retry, wait); | 2767 ngx_add_timer(&qc->retransmit, wait); |
2768 } | 2768 } |
2769 } | 2769 } |
2770 | 2770 |
2771 | 2771 |
2772 static void | 2772 static void |