summaryrefslogtreecommitdiffhomepage
path: root/src/stream/ngx_stream.c (unfollow)
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".
2023-05-14Common tree insert function for QUIC and UDP connections.Roman Arutyunyan1-5/+0
Previously, ngx_udp_rbtree_insert_value() was used for plain UDP and ngx_quic_rbtree_insert_value() was used for QUIC. Because of this it was impossible to initialize connection tree in ngx_create_listening() since this function is not aware what kind of listening it creates. Now ngx_udp_rbtree_insert_value() is used for both QUIC and UDP. To make is possible, a generic key field is added to ngx_udp_connection_t. It keeps client address for UDP and connection ID for QUIC.
2023-05-14Stream: removed QUIC support.Roman Arutyunyan1-21/+2
2022-04-20QUIC: separate UDP framework for QUIC.Roman Arutyunyan1-0/+15
Previously, QUIC used the existing UDP framework, which was created for UDP in Stream. However the way QUIC connections are created and looked up is different from the way UDP connections in Stream are created and looked up. Now these two implementations are decoupled.
2021-05-20Stream: the "fastopen" parameter of the "listen" directive.Ruslan Ermilov1-0/+4
Based on a patch by Anbang Wen.
2020-12-04QUIC: fixed missing quic flag on listener in the stream module.Vladimir Homutov1-0/+3
2020-07-21QUIC: added "quic" listen parameter in Stream.Roman Arutyunyan1-0/+6
Also, introduced ngx_stream_quic_module.
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-130/+120
2015-01-23Mail: fixed a comment.Ruslan Ermilov1-1/+1
2014-08-20Mail: fixed a comment.Valentin Bartenev1-2/+1
There's no loc_conf in the mail module.
2013-07-11Style.Maxim Dounin1-1/+1
2013-07-11Core: extended ngx_sock_ntop() with socklen parameter.Vladimir Homutov1-2/+4
On Linux, sockaddr length is required to process unix socket addresses properly due to unnamed sockets (which don't have sun_path set at all) and abstract namespace sockets.
2012-08-17Mail: fixed handling of AF_UNIX addresses in "listen".Ruslan Ermilov1-0/+6
This makes AF_UNIX addresses in mail officially supported.
2012-08-17Mail: fixed sorting of listen addresses (ticket #187).Ruslan Ermilov1-0/+5
For http module this problem was already fixed in r4756.
2012-01-18Copyright updated.Maxim Konovalov1-0/+1
2011-12-05Added the "so_keepalive=" parameter to the "listen" directive.Valentin Bartenev1-0/+13
The "so_keepalive" directive in mail module was deprecated. Thanks to Vsevolod Stakhov for initial work.
2009-05-18mail proxy listen IPv6 supportIgor Sysoev1-121/+237
2009-05-05ngx_create_listening()Igor Sysoev1-49/+7
2009-05-04delete ngx_listening_inet_stream_socket()Igor Sysoev1-3/+47
2009-05-04axe imap module artifactsIgor Sysoev1-25/+25
2009-04-30*) refactor error_log processing: listen socket log might inherit built-inIgor Sysoev1-3/+2
error_log with zero level, and r2447, r2466, r2467 were not enough *) remove bogus "stderr" level *) some functions and fields renames
2008-09-01*) listen sslIgor Sysoev1-0/+7
*) no default ssl_cetificate and ssl_cetificate_key
2008-08-21*) remove zero termination in ngx_inet_ntop() and ngx_sock_ntop()Igor Sysoev1-2/+2
*) use ngx_snprintf() in ngx_inet_ntop() and ngx_sock_ntop() as they are called just once per connection *) NGX_INET_ADDRSTRLEN