comparison src/event/ngx_event_quic_transport.c @ 7743:50db7ce374b7 quic

Advertise our max_idle_timeout in transport parameters. So we can easily tune how soon client would decide to close a connection.
author Sergey Kandaurov <pluknet@nginx.com>
date Tue, 24 Mar 2020 22:12:52 +0300
parents 19660929e8ff
children f85749b60e58
comparison
equal deleted inserted replaced
7742:ea264b21bfce 7743:50db7ce374b7
1571 tp->initial_max_stream_data_bidi_remote); 1571 tp->initial_max_stream_data_bidi_remote);
1572 1572
1573 len += ngx_quic_tp_len(NGX_QUIC_TP_INITIAL_MAX_STREAM_DATA_UNI, 1573 len += ngx_quic_tp_len(NGX_QUIC_TP_INITIAL_MAX_STREAM_DATA_UNI,
1574 tp->initial_max_stream_data_uni); 1574 tp->initial_max_stream_data_uni);
1575 1575
1576 len += ngx_quic_tp_len(NGX_QUIC_TP_MAX_IDLE_TIMEOUT,
1577 tp->max_idle_timeout);
1578
1576 if (pos == NULL) { 1579 if (pos == NULL) {
1577 #if (NGX_QUIC_DRAFT_VERSION < 27) 1580 #if (NGX_QUIC_DRAFT_VERSION < 27)
1578 len += 2; 1581 len += 2;
1579 #endif 1582 #endif
1580 return len; 1583 return len;
1604 tp->initial_max_stream_data_bidi_remote); 1607 tp->initial_max_stream_data_bidi_remote);
1605 1608
1606 ngx_quic_tp_vint(NGX_QUIC_TP_INITIAL_MAX_STREAM_DATA_UNI, 1609 ngx_quic_tp_vint(NGX_QUIC_TP_INITIAL_MAX_STREAM_DATA_UNI,
1607 tp->initial_max_stream_data_uni); 1610 tp->initial_max_stream_data_uni);
1608 1611
1612 ngx_quic_tp_vint(NGX_QUIC_TP_MAX_IDLE_TIMEOUT,
1613 tp->max_idle_timeout);
1614
1609 ngx_quic_hexdump0(ngx_cycle->log, "transport parameters", pos, p - pos); 1615 ngx_quic_hexdump0(ngx_cycle->log, "transport parameters", pos, p - pos);
1610 1616
1611 return p - pos; 1617 return p - pos;
1612 } 1618 }
1613 1619