comparison src/event/ngx_event_quic.h @ 8208:4ae9ac69ab93 quic

HTTP/QUIC interface reworked. - events handling moved into src/event/ngx_event_quic.c - http invokes once ngx_quic_run() and passes stream callback (diff to original http_request.c is now minimal) - streams are stored in rbtree using ID as a key - when a new stream is registered, appropriate callback is called - ngx_quic_stream_t type represents STREAM and stored in c->qs
author Vladimir Homutov <vl@nginx.com>
date Thu, 12 Mar 2020 16:54:43 +0300
parents b28ea685a56e
children 38c0898b6df7
comparison
equal deleted inserted replaced
8207:cc8d211cb45c 8208:4ae9ac69ab93
8 #define _NGX_EVENT_QUIC_H_INCLUDED_ 8 #define _NGX_EVENT_QUIC_H_INCLUDED_
9 9
10 10
11 #include <ngx_event_openssl.h> 11 #include <ngx_event_openssl.h>
12 12
13 struct ngx_quic_stream_s {
14 uint64_t id;
15 ngx_uint_t unidirectional:1;
16 ngx_connection_t *parent;
17 };
18
13 /* TODO: get rid somehow of ssl argument? */ 19 /* TODO: get rid somehow of ssl argument? */
14 ngx_int_t ngx_quic_input(ngx_connection_t *c, ngx_ssl_t *ssl, ngx_buf_t *b); 20 ngx_int_t ngx_quic_input(ngx_connection_t *c, ngx_ssl_t *ssl, ngx_buf_t *b);
15 ngx_int_t ngx_quic_output(ngx_connection_t *c); 21 ngx_int_t ngx_quic_output(ngx_connection_t *c);
16 22
17 void ngx_quic_init_ssl_methods(SSL_CTX* ctx); 23 void ngx_quic_init_ssl_methods(SSL_CTX* ctx);
18 24
25 void ngx_quic_run(ngx_connection_t *c, ngx_ssl_t *ssl, ngx_msec_t timeout,
26 ngx_connection_handler_pt handler);
27 ngx_connection_t *ngx_quic_create_uni_stream(ngx_connection_t *c);
19 28
20 #endif /* _NGX_EVENT_QUIC_H_INCLUDED_ */ 29 #endif /* _NGX_EVENT_QUIC_H_INCLUDED_ */