Mercurial > hg > nginx
comparison src/event/ngx_event_quic.h @ 8628:45db1b5c1706 quic
QUIC: connection multiplexing per port.
Also, connection migration within a single worker is implemented.
author | Roman Arutyunyan <arut@nginx.com> |
---|---|
date | Wed, 11 Nov 2020 11:57:50 +0000 |
parents | e0947c952d43 |
children | feec2cc762f6 |
comparison
equal
deleted
inserted
replaced
8627:405b6e8eb523 | 8628:45db1b5c1706 |
---|---|
56 #define NGX_QUIC_MAX_CID_LEN 20 | 56 #define NGX_QUIC_MAX_CID_LEN 20 |
57 #define NGX_QUIC_SERVER_CID_LEN NGX_QUIC_MAX_CID_LEN | 57 #define NGX_QUIC_SERVER_CID_LEN NGX_QUIC_MAX_CID_LEN |
58 | 58 |
59 #define NGX_QUIC_SR_TOKEN_LEN 16 | 59 #define NGX_QUIC_SR_TOKEN_LEN 16 |
60 | 60 |
61 #define NGX_QUIC_MAX_SERVER_IDS 8 | |
62 | |
61 | 63 |
62 typedef struct { | 64 typedef struct { |
63 /* configurable */ | 65 /* configurable */ |
64 ngx_msec_t max_idle_timeout; | 66 ngx_msec_t max_idle_timeout; |
65 ngx_msec_t max_ack_delay; | 67 ngx_msec_t max_ack_delay; |
70 size_t initial_max_stream_data_bidi_remote; | 72 size_t initial_max_stream_data_bidi_remote; |
71 size_t initial_max_stream_data_uni; | 73 size_t initial_max_stream_data_uni; |
72 ngx_uint_t initial_max_streams_bidi; | 74 ngx_uint_t initial_max_streams_bidi; |
73 ngx_uint_t initial_max_streams_uni; | 75 ngx_uint_t initial_max_streams_uni; |
74 ngx_uint_t ack_delay_exponent; | 76 ngx_uint_t ack_delay_exponent; |
75 ngx_uint_t disable_active_migration; | |
76 ngx_uint_t active_connection_id_limit; | 77 ngx_uint_t active_connection_id_limit; |
78 ngx_flag_t disable_active_migration; | |
77 ngx_str_t original_dcid; | 79 ngx_str_t original_dcid; |
78 ngx_str_t initial_scid; | 80 ngx_str_t initial_scid; |
79 ngx_str_t retry_scid; | 81 ngx_str_t retry_scid; |
80 u_char sr_token[NGX_QUIC_SR_TOKEN_LEN]; | 82 u_char sr_token[NGX_QUIC_SR_TOKEN_LEN]; |
81 ngx_uint_t sr_enabled; | 83 ngx_uint_t sr_enabled; |
121 void ngx_quic_run(ngx_connection_t *c, ngx_quic_conf_t *conf); | 123 void ngx_quic_run(ngx_connection_t *c, ngx_quic_conf_t *conf); |
122 ngx_connection_t *ngx_quic_open_stream(ngx_connection_t *c, ngx_uint_t bidi); | 124 ngx_connection_t *ngx_quic_open_stream(ngx_connection_t *c, ngx_uint_t bidi); |
123 void ngx_quic_finalize_connection(ngx_connection_t *c, ngx_uint_t err, | 125 void ngx_quic_finalize_connection(ngx_connection_t *c, ngx_uint_t err, |
124 const char *reason); | 126 const char *reason); |
125 uint32_t ngx_quic_version(ngx_connection_t *c); | 127 uint32_t ngx_quic_version(ngx_connection_t *c); |
128 ngx_int_t ngx_quic_get_packet_dcid(ngx_log_t *log, u_char *data, size_t len, | |
129 ngx_str_t *dcid); | |
126 | 130 |
127 | 131 |
128 /********************************* DEBUG *************************************/ | 132 /********************************* DEBUG *************************************/ |
129 | 133 |
130 /* #define NGX_QUIC_DEBUG_PACKETS */ /* dump packet contents */ | 134 /* #define NGX_QUIC_DEBUG_PACKETS */ /* dump packet contents */ |