comparison src/event/quic/ngx_event_quic.h @ 8724:fc64ab301bad quic

QUIC: connection shutdown. The function ngx_quic_shutdown_connection() waits until all non-cancelable streams are closed, and then closes the connection. In HTTP/3 cancelable streams are all unidirectional streams except push streams. The function is called from HTTP/3 when client reaches keepalive_requests.
author Roman Arutyunyan <arut@nginx.com>
date Mon, 15 Mar 2021 16:39:33 +0300
parents 12df02cc709f
children 9ce6d80df113
comparison
equal deleted inserted replaced
8723:265062a99043 8724:fc64ab301bad
118 uint64_t id; 118 uint64_t id;
119 uint64_t acked; 119 uint64_t acked;
120 uint64_t send_max_data; 120 uint64_t send_max_data;
121 ngx_buf_t *b; 121 ngx_buf_t *b;
122 ngx_quic_frames_stream_t fs; 122 ngx_quic_frames_stream_t fs;
123 ngx_uint_t cancelable; /* unsigned cancelable:1; */
123 }; 124 };
124 125
125 126
126 typedef struct ngx_quic_keys_s ngx_quic_keys_t; 127 typedef struct ngx_quic_keys_s ngx_quic_keys_t;
127 128
128 129
129 void ngx_quic_run(ngx_connection_t *c, ngx_quic_conf_t *conf); 130 void ngx_quic_run(ngx_connection_t *c, ngx_quic_conf_t *conf);
130 ngx_connection_t *ngx_quic_open_stream(ngx_connection_t *c, ngx_uint_t bidi); 131 ngx_connection_t *ngx_quic_open_stream(ngx_connection_t *c, ngx_uint_t bidi);
131 void ngx_quic_finalize_connection(ngx_connection_t *c, ngx_uint_t err, 132 void ngx_quic_finalize_connection(ngx_connection_t *c, ngx_uint_t err,
133 const char *reason);
134 void ngx_quic_shutdown_connection(ngx_connection_t *c, ngx_uint_t err,
132 const char *reason); 135 const char *reason);
133 ngx_int_t ngx_quic_reset_stream(ngx_connection_t *c, ngx_uint_t err); 136 ngx_int_t ngx_quic_reset_stream(ngx_connection_t *c, ngx_uint_t err);
134 uint32_t ngx_quic_version(ngx_connection_t *c); 137 uint32_t ngx_quic_version(ngx_connection_t *c);
135 ngx_int_t ngx_quic_get_packet_dcid(ngx_log_t *log, u_char *data, size_t len, 138 ngx_int_t ngx_quic_get_packet_dcid(ngx_log_t *log, u_char *data, size_t len,
136 ngx_str_t *dcid); 139 ngx_str_t *dcid);