comparison 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
comparison
equal deleted inserted replaced
8733:385d511b5064 8734:c61fcdc1b8e3
167 #endif 167 #endif
168 168
169 169
170 #if !(NGX_WIN32) 170 #if !(NGX_WIN32)
171 171
172 typedef struct {
173 ngx_buf_t *buffer;
174 struct sockaddr *sockaddr;
175 socklen_t socklen;
176 } ngx_udp_dgram_t;
177
178
172 struct ngx_udp_connection_s { 179 struct ngx_udp_connection_s {
173 ngx_rbtree_node_t node; 180 ngx_rbtree_node_t node;
174 ngx_connection_t *connection; 181 ngx_connection_t *connection;
175 ngx_str_t key; 182 ngx_str_t key;
176 ngx_buf_t *buffer; 183 ngx_udp_dgram_t *dgram;
177 }; 184 };
178 185
179 #endif 186 #endif
180 187
181 188