summaryrefslogtreecommitdiffhomepage
path: root/src/stream/ngx_stream.c (follow)
AgeCommit message (Collapse)AuthorFilesLines
2024-03-22Stream: the "setfib" parameter of the "listen" directive.Sergey Kandaurov1-0/+4
The FreeBSD SO_SETFIB support.
2024-03-22Stream: the "accept_filter" parameter of the "listen" directive.Sergey Kandaurov1-0/+4
The FreeBSD accept filters support.
2024-03-22Stream: the "deferred" parameter of the "listen" directive.Sergey Kandaurov1-0/+4
The Linux TCP_DEFER_ACCEPT support.
2023-12-14Stream: virtual servers.Roman Arutyunyan1-163/+671
Server name is taken either from ngx_stream_ssl_module or ngx_stream_ssl_preread_module. The change adds "default_server" parameter to the "listen" directive, as well as the following directives: "server_names_hash_max_size", "server_names_hash_bucket_size", "server_name" and "ssl_reject_handshake".
2021-05-20Stream: the "fastopen" parameter of the "listen" directive.Ruslan Ermilov1-0/+4
Based on a patch by Anbang Wen.
2019-03-15Multiple addresses in "listen".Roman Arutyunyan1-36/+6
Previously only one address was used by the listen directive handler even if host name resolved to multiple addresses. Now a separate listening socket is created for each address.
2018-07-12Events: moved sockets cloning to ngx_event_init_conf().Maxim Dounin1-4/+0
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.
2017-04-03Stream: configurable socket buffer sizes.Vladimir Homutov1-0/+2
The "rcvbuf" and "sndbuf" parameters are now supported by the "listen" directive.
2016-10-10Modules compatibility: removed dependencies on NGX_STREAM_SSL.Maxim Dounin1-2/+0
External structures are now identical regardless of stream SSL module compiled in or not.
2016-10-03Modules compatibility: removed unneeded IPV6_V6ONLY checks.Maxim Dounin1-1/+1
The IPV6_V6ONLY macro is now checked only while parsing appropriate flag and when using the macro. The ipv6only field in listen structures is always initialized to 1, even if not supported on a given platform. This is expected to prevent a module compiled without IPV6_V6ONLY from accidentally creating dual sockets if loaded into main binary with proper IPV6_V6ONLY support.
2016-09-15Stream: preread phase.Vladimir Homutov1-0/+11
In this phase, head of a stream is read and analysed before proceeding to the content phase. Amount of data read is controlled by the module implementing the phase, but not more than defined by the "preread_buffer_size" directive. The time spent on processing preread is controlled by the "preread_timeout" directive. The typical preread phase module will parse the beginning of a stream and set variable that may be used by the content phase, for example to make routing decision.
2016-09-15Stream: phases.Roman Arutyunyan1-0/+110
2016-09-15Stream: filters.Roman Arutyunyan1-0/+3
2016-09-06Stream: the "proxy_protocol" parameter of the "listen" directive.Dmitry Volyntsev1-0/+2
2016-07-04Stream: variables and script.Vladimir Homutov1-0/+4
This is a port of corresponding http code with unrelated features excluded.
2016-06-15Stream: added preconfiguration step.Vladimir Homutov1-2/+17
2016-06-20Introduced ngx_inet_get_port() and ngx_inet_set_port() functions.Roman Arutyunyan1-25/+1
2016-05-23Renamed "u" to "sockaddr" in listen options types.Maxim Dounin1-10/+10
2016-01-20Stream: UDP proxy.Roman Arutyunyan1-1/+8
2016-02-04Dynamic modules: changed ngx_modules to cycle->modules.Maxim Dounin1-11/+11
2016-02-04Dynamic modules: moved module-related stuff to separate files.Maxim Dounin1-8/+1
2015-06-16Disabled duplicate http, mail, and stream blocks.Vladimir Homutov1-0/+4
Such configurations have very limited use, introduce various problems and are not officially supported.
2015-06-09Stream: added postconfiguration method to stream modules.Vladimir Homutov1-0/+14
2015-06-08Stream: listen backlog=.Ruslan Ermilov1-0/+2
2015-06-08Stream: embed ngx_stream_listen_t into ngx_stream_conf_addr_t.Ruslan Ermilov1-46/+28
2015-06-05Stream: fixed "reuseport" to actually work.Ruslan Ermilov1-0/+7
2015-05-20The "reuseport" option of the "listen" directive.Maxim Dounin1-0/+4
When configured, an individual listen socket on a given address is created for each worker process. This allows to reduce in-kernel lock contention on configurations with high accept rates, resulting in better performance. As of now it works on Linux and DragonFly BSD. Note that on Linux incoming connection requests are currently tied up to a specific listen socket, and if some sockets are closed, connection requests will be reset, see https://lwn.net/Articles/542629/. With nginx, this may happen if the number of worker processes is reduced. There is no such problem on DragonFly BSD. Based on previous work by Sepherosa Ziehau and Yingqi Lu.
2015-05-20Simplified ngx_http_init_listening().Maxim Dounin1-7/+1
There is no need to set "i" to 0, as it's expected to be 0 assuming the bindings are properly sorted, and we already rely on this when explicitly set hport->naddrs to 1. Remaining conditional code is replaced with identical "hport->naddrs = i + 1". Identical modifications are done in the mail and stream modules, in the ngx_mail_optimize_servers() and ngx_stream_optimize_servers() functions, respectively. No functional changes.
2015-04-25Core: the ngx_set_connection_log() macro.Vladimir Homutov1-1/+1
The http and stream versions of this macro were identical.
2015-04-20Stream: port from NGINX+.Ruslan Ermilov1-0/+557