comparison src/core/ngx_connection.h @ 7286:d27aa9060c95

Stream: udp streams. Previously, only one client packet could be processed in a udp stream session even though multiple response packets were supported. Now multiple packets coming from the same client address and port are delivered to the same stream session. If it's required to maintain a single stream of data, nginx should be configured in a way that all packets from a client are delivered to the same worker. On Linux and DragonFly BSD the "reuseport" parameter should be specified for this. Other systems do not currently provide appropriate mechanisms. For these systems a single stream of udp packets is only guaranteed in single-worker configurations. The proxy_response directive now specifies how many packets are expected in response to a single client packet.
author Roman Arutyunyan <arut@nginx.com>
date Mon, 04 Jun 2018 19:50:00 +0300
parents ed1101bbf19f
children e7b2b907c0f8
comparison
equal deleted inserted replaced
7285:88a624c9b491 7286:d27aa9060c95
48 /* should be here because of the deferred accept */ 48 /* should be here because of the deferred accept */
49 ngx_msec_t post_accept_timeout; 49 ngx_msec_t post_accept_timeout;
50 50
51 ngx_listening_t *previous; 51 ngx_listening_t *previous;
52 ngx_connection_t *connection; 52 ngx_connection_t *connection;
53
54 ngx_rbtree_t rbtree;
55 ngx_rbtree_node_t sentinel;
53 56
54 ngx_uint_t worker; 57 ngx_uint_t worker;
55 58
56 unsigned open:1; 59 unsigned open:1;
57 unsigned remain:1; 60 unsigned remain:1;
148 in_port_t proxy_protocol_port; 151 in_port_t proxy_protocol_port;
149 152
150 #if (NGX_SSL || NGX_COMPAT) 153 #if (NGX_SSL || NGX_COMPAT)
151 ngx_ssl_connection_t *ssl; 154 ngx_ssl_connection_t *ssl;
152 #endif 155 #endif
156
157 ngx_udp_connection_t *udp;
153 158
154 struct sockaddr *local_sockaddr; 159 struct sockaddr *local_sockaddr;
155 socklen_t local_socklen; 160 socklen_t local_socklen;
156 161
157 ngx_buf_t *buffer; 162 ngx_buf_t *buffer;