comparison src/event/ngx_event.h @ 8809:6f434af59257 quic

Core: the ngx_event_udp.h header file.
author Vladimir Homutov <vl@nginx.com>
date Mon, 12 Jul 2021 16:40:57 +0300
parents c61fcdc1b8e3
children eaf356a35f5d
comparison
equal deleted inserted replaced
8808:5b0c229ba5fe 8809:6f434af59257
165 }; 165 };
166 166
167 #endif 167 #endif
168 168
169 169
170 #if !(NGX_WIN32)
171
172 typedef struct {
173 ngx_buf_t *buffer;
174 struct sockaddr *sockaddr;
175 socklen_t socklen;
176 } ngx_udp_dgram_t;
177
178
179 struct ngx_udp_connection_s {
180 ngx_rbtree_node_t node;
181 ngx_connection_t *connection;
182 ngx_str_t key;
183 ngx_udp_dgram_t *dgram;
184 };
185
186 #endif
187
188
189 typedef struct { 170 typedef struct {
190 ngx_int_t (*add)(ngx_event_t *ev, ngx_int_t event, ngx_uint_t flags); 171 ngx_int_t (*add)(ngx_event_t *ev, ngx_int_t event, ngx_uint_t flags);
191 ngx_int_t (*del)(ngx_event_t *ev, ngx_int_t event, ngx_uint_t flags); 172 ngx_int_t (*del)(ngx_event_t *ev, ngx_int_t event, ngx_uint_t flags);
192 173
193 ngx_int_t (*enable)(ngx_event_t *ev, ngx_int_t event, ngx_uint_t flags); 174 ngx_int_t (*enable)(ngx_event_t *ev, ngx_int_t event, ngx_uint_t flags);
514 (*(ngx_get_conf(conf_ctx, ngx_events_module))) [module.ctx_index] 495 (*(ngx_get_conf(conf_ctx, ngx_events_module))) [module.ctx_index]
515 496
516 497
517 498
518 void ngx_event_accept(ngx_event_t *ev); 499 void ngx_event_accept(ngx_event_t *ev);
519 #if !(NGX_WIN32)
520 void ngx_event_recvmsg(ngx_event_t *ev);
521 void ngx_udp_rbtree_insert_value(ngx_rbtree_node_t *temp,
522 ngx_rbtree_node_t *node, ngx_rbtree_node_t *sentinel);
523 void ngx_insert_udp_connection(ngx_connection_t *c, ngx_udp_connection_t *udp,
524 ngx_str_t *key);
525 #endif
526 void ngx_delete_udp_connection(void *data);
527 ngx_int_t ngx_trylock_accept_mutex(ngx_cycle_t *cycle); 500 ngx_int_t ngx_trylock_accept_mutex(ngx_cycle_t *cycle);
528 ngx_int_t ngx_enable_accept_events(ngx_cycle_t *cycle); 501 ngx_int_t ngx_enable_accept_events(ngx_cycle_t *cycle);
529 u_char *ngx_accept_log_error(ngx_log_t *log, u_char *buf, size_t len); 502 u_char *ngx_accept_log_error(ngx_log_t *log, u_char *buf, size_t len);
530 #if (NGX_DEBUG) 503 #if (NGX_DEBUG)
531 void ngx_debug_accepted_connection(ngx_event_conf_t *ecf, ngx_connection_t *c); 504 void ngx_debug_accepted_connection(ngx_event_conf_t *ecf, ngx_connection_t *c);
551 #define ngx_event_ident(p) ((ngx_connection_t *) (p))->fd 524 #define ngx_event_ident(p) ((ngx_connection_t *) (p))->fd
552 525
553 526
554 #include <ngx_event_timer.h> 527 #include <ngx_event_timer.h>
555 #include <ngx_event_posted.h> 528 #include <ngx_event_posted.h>
529 #include <ngx_event_udp.h>
556 530
557 #if (NGX_WIN32) 531 #if (NGX_WIN32)
558 #include <ngx_iocp_module.h> 532 #include <ngx_iocp_module.h>
559 #endif 533 #endif
560 534