comparison src/core/ngx_connection.h @ 7315:e7b2b907c0f8

Events: moved sockets cloning to ngx_event_init_conf(). Previously, listenings sockets were not cloned if the worker_processes directive was specified after "listen ... reuseport". This also simplifies upcoming configuration check on the number of worker connections, as it needs to know the number of listening sockets before cloning.
author Maxim Dounin <mdounin@mdounin.ru>
date Thu, 12 Jul 2018 19:50:02 +0300
parents d27aa9060c95
children 06b01840bd42
comparison
equal deleted inserted replaced
7314:3dfc1584ad75 7315:e7b2b907c0f8
208 } 208 }
209 209
210 210
211 ngx_listening_t *ngx_create_listening(ngx_conf_t *cf, struct sockaddr *sockaddr, 211 ngx_listening_t *ngx_create_listening(ngx_conf_t *cf, struct sockaddr *sockaddr,
212 socklen_t socklen); 212 socklen_t socklen);
213 ngx_int_t ngx_clone_listening(ngx_conf_t *cf, ngx_listening_t *ls); 213 ngx_int_t ngx_clone_listening(ngx_cycle_t *cycle, ngx_listening_t *ls);
214 ngx_int_t ngx_set_inherited_sockets(ngx_cycle_t *cycle); 214 ngx_int_t ngx_set_inherited_sockets(ngx_cycle_t *cycle);
215 ngx_int_t ngx_open_listening_sockets(ngx_cycle_t *cycle); 215 ngx_int_t ngx_open_listening_sockets(ngx_cycle_t *cycle);
216 void ngx_configure_listening_sockets(ngx_cycle_t *cycle); 216 void ngx_configure_listening_sockets(ngx_cycle_t *cycle);
217 void ngx_close_listening_sockets(ngx_cycle_t *cycle); 217 void ngx_close_listening_sockets(ngx_cycle_t *cycle);
218 void ngx_close_connection(ngx_connection_t *c); 218 void ngx_close_connection(ngx_connection_t *c);