Mercurial > hg > nginx
diff src/event/ngx_event.h @ 8734:c61fcdc1b8e3 quic
UDP: extended datagram context.
Sometimes it is required to process datagram properties at higher level (i.e.
QUIC is interested in source address which may change and IP options). The
patch adds ngx_udp_dgram_t structure used to pass packet-related information
in c->udp.
author | Vladimir Homutov <vl@nginx.com> |
---|---|
date | Fri, 02 Apr 2021 18:58:19 +0300 |
parents | 45db1b5c1706 |
children | 6f434af59257 |
line wrap: on
line diff
--- a/src/event/ngx_event.h +++ b/src/event/ngx_event.h @@ -169,11 +169,18 @@ struct ngx_event_aio_s { #if !(NGX_WIN32) +typedef struct { + ngx_buf_t *buffer; + struct sockaddr *sockaddr; + socklen_t socklen; +} ngx_udp_dgram_t; + + struct ngx_udp_connection_s { ngx_rbtree_node_t node; ngx_connection_t *connection; ngx_str_t key; - ngx_buf_t *buffer; + ngx_udp_dgram_t *dgram; }; #endif