Mercurial > hg > nginx-quic
annotate src/core/ngx_connection.h @ 7677:6bc18966b8c1 quic
Stream "connection" read/write methods.
author | Vladimir Homutov <vl@nginx.com> |
---|---|
date | Fri, 13 Mar 2020 14:39:23 +0300 |
parents | 4ae9ac69ab93 |
children | db8fe75c9c7a |
rev | line source |
---|---|
441
da8c5707af39
nginx-0.1.0-2004-09-28-12:34:51 import; set copyright and remove unused files
Igor Sysoev <igor@sysoev.ru>
parents:
432
diff
changeset
|
1 |
da8c5707af39
nginx-0.1.0-2004-09-28-12:34:51 import; set copyright and remove unused files
Igor Sysoev <igor@sysoev.ru>
parents:
432
diff
changeset
|
2 /* |
444
42d11f017717
nginx-0.1.0-2004-09-29-20:00:49 import; remove years from copyright
Igor Sysoev <igor@sysoev.ru>
parents:
441
diff
changeset
|
3 * Copyright (C) Igor Sysoev |
4412 | 4 * Copyright (C) Nginx, Inc. |
441
da8c5707af39
nginx-0.1.0-2004-09-28-12:34:51 import; set copyright and remove unused files
Igor Sysoev <igor@sysoev.ru>
parents:
432
diff
changeset
|
5 */ |
da8c5707af39
nginx-0.1.0-2004-09-28-12:34:51 import; set copyright and remove unused files
Igor Sysoev <igor@sysoev.ru>
parents:
432
diff
changeset
|
6 |
da8c5707af39
nginx-0.1.0-2004-09-28-12:34:51 import; set copyright and remove unused files
Igor Sysoev <igor@sysoev.ru>
parents:
432
diff
changeset
|
7 |
0
4eff17414a43
nginx-0.0.1-2002-08-06-20:39:45 import
Igor Sysoev <igor@sysoev.ru>
parents:
diff
changeset
|
8 #ifndef _NGX_CONNECTION_H_INCLUDED_ |
4eff17414a43
nginx-0.0.1-2002-08-06-20:39:45 import
Igor Sysoev <igor@sysoev.ru>
parents:
diff
changeset
|
9 #define _NGX_CONNECTION_H_INCLUDED_ |
4eff17414a43
nginx-0.0.1-2002-08-06-20:39:45 import
Igor Sysoev <igor@sysoev.ru>
parents:
diff
changeset
|
10 |
103
6dfda4cf5200
nginx-0.0.1-2003-06-11-19:28:34 import
Igor Sysoev <igor@sysoev.ru>
parents:
101
diff
changeset
|
11 |
100
7ebc8b7fb816
nginx-0.0.1-2003-06-03-19:42:58 import
Igor Sysoev <igor@sysoev.ru>
parents:
99
diff
changeset
|
12 #include <ngx_config.h> |
92
19cc647ecd91
nginx-0.0.1-2003-05-20-19:37:55 import
Igor Sysoev <igor@sysoev.ru>
parents:
91
diff
changeset
|
13 #include <ngx_core.h> |
103
6dfda4cf5200
nginx-0.0.1-2003-06-11-19:28:34 import
Igor Sysoev <igor@sysoev.ru>
parents:
101
diff
changeset
|
14 |
6dfda4cf5200
nginx-0.0.1-2003-06-11-19:28:34 import
Igor Sysoev <igor@sysoev.ru>
parents:
101
diff
changeset
|
15 |
543 | 16 typedef struct ngx_listening_s ngx_listening_t; |
17 | |
18 struct ngx_listening_s { | |
19 ngx_socket_t fd; | |
103
6dfda4cf5200
nginx-0.0.1-2003-06-11-19:28:34 import
Igor Sysoev <igor@sysoev.ru>
parents:
101
diff
changeset
|
20 |
543 | 21 struct sockaddr *sockaddr; |
22 socklen_t socklen; /* size of sockaddr */ | |
23 size_t addr_text_max_len; | |
24 ngx_str_t addr_text; | |
103
6dfda4cf5200
nginx-0.0.1-2003-06-11-19:28:34 import
Igor Sysoev <igor@sysoev.ru>
parents:
101
diff
changeset
|
25 |
543 | 26 int type; |
563 | 27 |
543 | 28 int backlog; |
563 | 29 int rcvbuf; |
30 int sndbuf; | |
4323
c4513d4dd024
Added the "so_keepalive=" parameter to the "listen" directive.
Valentin Bartenev <vbart@nginx.com>
parents:
3880
diff
changeset
|
31 #if (NGX_HAVE_KEEPALIVE_TUNABLE) |
c4513d4dd024
Added the "so_keepalive=" parameter to the "listen" directive.
Valentin Bartenev <vbart@nginx.com>
parents:
3880
diff
changeset
|
32 int keepidle; |
c4513d4dd024
Added the "so_keepalive=" parameter to the "listen" directive.
Valentin Bartenev <vbart@nginx.com>
parents:
3880
diff
changeset
|
33 int keepintvl; |
c4513d4dd024
Added the "so_keepalive=" parameter to the "listen" directive.
Valentin Bartenev <vbart@nginx.com>
parents:
3880
diff
changeset
|
34 int keepcnt; |
c4513d4dd024
Added the "so_keepalive=" parameter to the "listen" directive.
Valentin Bartenev <vbart@nginx.com>
parents:
3880
diff
changeset
|
35 #endif |
103
6dfda4cf5200
nginx-0.0.1-2003-06-11-19:28:34 import
Igor Sysoev <igor@sysoev.ru>
parents:
101
diff
changeset
|
36 |
543 | 37 /* handler of accepted connection */ |
547 | 38 ngx_connection_handler_pt handler; |
543 | 39 |
40 void *servers; /* array of ngx_http_in_addr_t, for example */ | |
103
6dfda4cf5200
nginx-0.0.1-2003-06-11-19:28:34 import
Igor Sysoev <igor@sysoev.ru>
parents:
101
diff
changeset
|
41 |
543 | 42 ngx_log_t log; |
2785
d478379e51ac
*) refactor error_log processing: listen socket log might inherit built-in
Igor Sysoev <igor@sysoev.ru>
parents:
2562
diff
changeset
|
43 ngx_log_t *logp; |
103
6dfda4cf5200
nginx-0.0.1-2003-06-11-19:28:34 import
Igor Sysoev <igor@sysoev.ru>
parents:
101
diff
changeset
|
44 |
543 | 45 size_t pool_size; |
46 /* should be here because of the AcceptEx() preread */ | |
47 size_t post_accept_buffer_size; | |
48 /* should be here because of the deferred accept */ | |
557 | 49 ngx_msec_t post_accept_timeout; |
543 | 50 |
51 ngx_listening_t *previous; | |
52 ngx_connection_t *connection; | |
103
6dfda4cf5200
nginx-0.0.1-2003-06-11-19:28:34 import
Igor Sysoev <igor@sysoev.ru>
parents:
101
diff
changeset
|
53 |
7286 | 54 ngx_rbtree_t rbtree; |
55 ngx_rbtree_node_t sentinel; | |
56 | |
6153
4f6efabcb09b
The "reuseport" option of the "listen" directive.
Maxim Dounin <mdounin@mdounin.ru>
parents:
6129
diff
changeset
|
57 ngx_uint_t worker; |
4f6efabcb09b
The "reuseport" option of the "listen" directive.
Maxim Dounin <mdounin@mdounin.ru>
parents:
6129
diff
changeset
|
58 |
543 | 59 unsigned open:1; |
60 unsigned remain:1; | |
61 unsigned ignore:1; | |
109
a9bc21d63fe4
nginx-0.0.1-2003-07-02-18:41:17 import
Igor Sysoev <igor@sysoev.ru>
parents:
103
diff
changeset
|
62 |
543 | 63 unsigned bound:1; /* already bound */ |
64 unsigned inherited:1; /* inherited from previous process */ | |
65 unsigned nonblocking_accept:1; | |
563 | 66 unsigned listen:1; |
543 | 67 unsigned nonblocking:1; |
68 unsigned shared:1; /* shared between threads or processes */ | |
69 unsigned addr_ntop:1; | |
6436 | 70 unsigned wildcard:1; |
523 | 71 |
6719
cebf5fed00bf
Modules compatibility: removed unneeded IPV6_V6ONLY checks.
Maxim Dounin <mdounin@mdounin.ru>
parents:
6602
diff
changeset
|
72 #if (NGX_HAVE_INET6) |
4771
bdcdbdf35b52
Core: ipv6only is now on by default.
Ruslan Ermilov <ru@nginx.com>
parents:
4412
diff
changeset
|
73 unsigned ipv6only:1; |
2562 | 74 #endif |
6153
4f6efabcb09b
The "reuseport" option of the "listen" directive.
Maxim Dounin <mdounin@mdounin.ru>
parents:
6129
diff
changeset
|
75 unsigned reuseport:1; |
4f6efabcb09b
The "reuseport" option of the "listen" directive.
Maxim Dounin <mdounin@mdounin.ru>
parents:
6129
diff
changeset
|
76 unsigned add_reuseport:1; |
4323
c4513d4dd024
Added the "so_keepalive=" parameter to the "listen" directive.
Valentin Bartenev <vbart@nginx.com>
parents:
3880
diff
changeset
|
77 unsigned keepalive:2; |
2562 | 78 |
543 | 79 unsigned deferred_accept:1; |
80 unsigned delete_deferred:1; | |
81 unsigned add_deferred:1; | |
6721
48bab8b83f4e
Modules compatibility: removed two NGX_HAVE_DEFERRED_ACCEPT checks.
Ruslan Ermilov <ru@nginx.com>
parents:
6720
diff
changeset
|
82 #if (NGX_HAVE_DEFERRED_ACCEPT && defined SO_ACCEPTFILTER) |
543 | 83 char *accept_filter; |
523 | 84 #endif |
3676 | 85 #if (NGX_HAVE_SETFIB) |
86 int setfib; | |
87 #endif | |
419
47709bff4468
nginx-0.0.10-2004-09-09-19:40:48 import
Igor Sysoev <igor@sysoev.ru>
parents:
417
diff
changeset
|
88 |
5456
692afcea9d0d
Added support for TCP_FASTOPEN supported in Linux >= 3.7.1.
Mathew Rodley <mathew@rodley.com.au>
parents:
5104
diff
changeset
|
89 #if (NGX_HAVE_TCP_FASTOPEN) |
692afcea9d0d
Added support for TCP_FASTOPEN supported in Linux >= 3.7.1.
Mathew Rodley <mathew@rodley.com.au>
parents:
5104
diff
changeset
|
90 int fastopen; |
692afcea9d0d
Added support for TCP_FASTOPEN supported in Linux >= 3.7.1.
Mathew Rodley <mathew@rodley.com.au>
parents:
5104
diff
changeset
|
91 #endif |
692afcea9d0d
Added support for TCP_FASTOPEN supported in Linux >= 3.7.1.
Mathew Rodley <mathew@rodley.com.au>
parents:
5104
diff
changeset
|
92 |
543 | 93 }; |
92
19cc647ecd91
nginx-0.0.1-2003-05-20-19:37:55 import
Igor Sysoev <igor@sysoev.ru>
parents:
91
diff
changeset
|
94 |
0
4eff17414a43
nginx-0.0.1-2002-08-06-20:39:45 import
Igor Sysoev <igor@sysoev.ru>
parents:
diff
changeset
|
95 |
256
8e39cab6abd5
nginx-0.0.2-2004-02-10-19:23:38 import
Igor Sysoev <igor@sysoev.ru>
parents:
253
diff
changeset
|
96 typedef enum { |
6474 | 97 NGX_ERROR_ALERT = 0, |
98 NGX_ERROR_ERR, | |
99 NGX_ERROR_INFO, | |
100 NGX_ERROR_IGNORE_ECONNRESET, | |
101 NGX_ERROR_IGNORE_EINVAL | |
256
8e39cab6abd5
nginx-0.0.2-2004-02-10-19:23:38 import
Igor Sysoev <igor@sysoev.ru>
parents:
253
diff
changeset
|
102 } ngx_connection_log_error_e; |
8e39cab6abd5
nginx-0.0.2-2004-02-10-19:23:38 import
Igor Sysoev <igor@sysoev.ru>
parents:
253
diff
changeset
|
103 |
8e39cab6abd5
nginx-0.0.2-2004-02-10-19:23:38 import
Igor Sysoev <igor@sysoev.ru>
parents:
253
diff
changeset
|
104 |
344
e366ba5db8f8
nginx-0.0.3-2004-06-01-10:04:46 import
Igor Sysoev <igor@sysoev.ru>
parents:
343
diff
changeset
|
105 typedef enum { |
6474 | 106 NGX_TCP_NODELAY_UNSET = 0, |
107 NGX_TCP_NODELAY_SET, | |
108 NGX_TCP_NODELAY_DISABLED | |
483 | 109 } ngx_connection_tcp_nodelay_e; |
110 | |
111 | |
112 typedef enum { | |
6474 | 113 NGX_TCP_NOPUSH_UNSET = 0, |
114 NGX_TCP_NOPUSH_SET, | |
115 NGX_TCP_NOPUSH_DISABLED | |
344
e366ba5db8f8
nginx-0.0.3-2004-06-01-10:04:46 import
Igor Sysoev <igor@sysoev.ru>
parents:
343
diff
changeset
|
116 } ngx_connection_tcp_nopush_e; |
e366ba5db8f8
nginx-0.0.3-2004-06-01-10:04:46 import
Igor Sysoev <igor@sysoev.ru>
parents:
343
diff
changeset
|
117 |
e366ba5db8f8
nginx-0.0.3-2004-06-01-10:04:46 import
Igor Sysoev <igor@sysoev.ru>
parents:
343
diff
changeset
|
118 |
829
362d156f0278
high level HTTP buffered flags should be on per-subrequest basis,
Igor Sysoev <igor@sysoev.ru>
parents:
641
diff
changeset
|
119 #define NGX_LOWLEVEL_BUFFERED 0x0f |
362d156f0278
high level HTTP buffered flags should be on per-subrequest basis,
Igor Sysoev <igor@sysoev.ru>
parents:
641
diff
changeset
|
120 #define NGX_SSL_BUFFERED 0x01 |
6246
257b51c37c5a
The HTTP/2 implementation (RFC 7240, 7241).
Valentin Bartenev <vbart@nginx.com>
parents:
6220
diff
changeset
|
121 #define NGX_HTTP_V2_BUFFERED 0x02 |
597 | 122 |
123 | |
0
4eff17414a43
nginx-0.0.1-2002-08-06-20:39:45 import
Igor Sysoev <igor@sysoev.ru>
parents:
diff
changeset
|
124 struct ngx_connection_s { |
396
6f3b20c1ac50
nginx-0.0.7-2004-07-18-23:11:20 import
Igor Sysoev <igor@sysoev.ru>
parents:
393
diff
changeset
|
125 void *data; |
6f3b20c1ac50
nginx-0.0.7-2004-07-18-23:11:20 import
Igor Sysoev <igor@sysoev.ru>
parents:
393
diff
changeset
|
126 ngx_event_t *read; |
6f3b20c1ac50
nginx-0.0.7-2004-07-18-23:11:20 import
Igor Sysoev <igor@sysoev.ru>
parents:
393
diff
changeset
|
127 ngx_event_t *write; |
103
6dfda4cf5200
nginx-0.0.1-2003-06-11-19:28:34 import
Igor Sysoev <igor@sysoev.ru>
parents:
101
diff
changeset
|
128 |
396
6f3b20c1ac50
nginx-0.0.7-2004-07-18-23:11:20 import
Igor Sysoev <igor@sysoev.ru>
parents:
393
diff
changeset
|
129 ngx_socket_t fd; |
103
6dfda4cf5200
nginx-0.0.1-2003-06-11-19:28:34 import
Igor Sysoev <igor@sysoev.ru>
parents:
101
diff
changeset
|
130 |
396
6f3b20c1ac50
nginx-0.0.7-2004-07-18-23:11:20 import
Igor Sysoev <igor@sysoev.ru>
parents:
393
diff
changeset
|
131 ngx_recv_pt recv; |
539 | 132 ngx_send_pt send; |
577 | 133 ngx_recv_chain_pt recv_chain; |
396
6f3b20c1ac50
nginx-0.0.7-2004-07-18-23:11:20 import
Igor Sysoev <igor@sysoev.ru>
parents:
393
diff
changeset
|
134 ngx_send_chain_pt send_chain; |
6f3b20c1ac50
nginx-0.0.7-2004-07-18-23:11:20 import
Igor Sysoev <igor@sysoev.ru>
parents:
393
diff
changeset
|
135 |
6f3b20c1ac50
nginx-0.0.7-2004-07-18-23:11:20 import
Igor Sysoev <igor@sysoev.ru>
parents:
393
diff
changeset
|
136 ngx_listening_t *listening; |
0
4eff17414a43
nginx-0.0.1-2002-08-06-20:39:45 import
Igor Sysoev <igor@sysoev.ru>
parents:
diff
changeset
|
137 |
396
6f3b20c1ac50
nginx-0.0.7-2004-07-18-23:11:20 import
Igor Sysoev <igor@sysoev.ru>
parents:
393
diff
changeset
|
138 off_t sent; |
8
708f8bb772ec
nginx-0.0.1-2002-09-02-18:48:24 import
Igor Sysoev <igor@sysoev.ru>
parents:
7
diff
changeset
|
139 |
396
6f3b20c1ac50
nginx-0.0.7-2004-07-18-23:11:20 import
Igor Sysoev <igor@sysoev.ru>
parents:
393
diff
changeset
|
140 ngx_log_t *log; |
57
a499e0d1f16e
nginx-0.0.1-2003-01-30-10:28:09 import
Igor Sysoev <igor@sysoev.ru>
parents:
44
diff
changeset
|
141 |
396
6f3b20c1ac50
nginx-0.0.7-2004-07-18-23:11:20 import
Igor Sysoev <igor@sysoev.ru>
parents:
393
diff
changeset
|
142 ngx_pool_t *pool; |
103
6dfda4cf5200
nginx-0.0.1-2003-06-11-19:28:34 import
Igor Sysoev <igor@sysoev.ru>
parents:
101
diff
changeset
|
143 |
6436 | 144 int type; |
145 | |
396
6f3b20c1ac50
nginx-0.0.7-2004-07-18-23:11:20 import
Igor Sysoev <igor@sysoev.ru>
parents:
393
diff
changeset
|
146 struct sockaddr *sockaddr; |
6f3b20c1ac50
nginx-0.0.7-2004-07-18-23:11:20 import
Igor Sysoev <igor@sysoev.ru>
parents:
393
diff
changeset
|
147 socklen_t socklen; |
6f3b20c1ac50
nginx-0.0.7-2004-07-18-23:11:20 import
Igor Sysoev <igor@sysoev.ru>
parents:
393
diff
changeset
|
148 ngx_str_t addr_text; |
103
6dfda4cf5200
nginx-0.0.1-2003-06-11-19:28:34 import
Igor Sysoev <igor@sysoev.ru>
parents:
101
diff
changeset
|
149 |
7633
5d91389e0fd3
Initial QUIC support in http.
Sergey Kandaurov <pluknet@nginx.com>
parents:
7590
diff
changeset
|
150 ngx_proxy_protocol_t *proxy_protocol; |
5605
3a72b1805c52
Added server-side support for PROXY protocol v1 (ticket #355).
Roman Arutyunyan <arut@nginx.com>
parents:
5513
diff
changeset
|
151 |
6735
e38e9c50a40e
Modules compatibility: compatibility with NGX_HTTP_SSL.
Maxim Dounin <mdounin@mdounin.ru>
parents:
6734
diff
changeset
|
152 #if (NGX_SSL || NGX_COMPAT) |
7633
5d91389e0fd3
Initial QUIC support in http.
Sergey Kandaurov <pluknet@nginx.com>
parents:
7590
diff
changeset
|
153 ngx_quic_connection_t *quic; |
7674
4ae9ac69ab93
HTTP/QUIC interface reworked.
Vladimir Homutov <vl@nginx.com>
parents:
7633
diff
changeset
|
154 ngx_quic_stream_t *qs; |
7633
5d91389e0fd3
Initial QUIC support in http.
Sergey Kandaurov <pluknet@nginx.com>
parents:
7590
diff
changeset
|
155 ngx_ssl_connection_t *ssl; |
392
d1222d46b3f9
nginx-0.0.7-2004-07-15-00:07:58 import
Igor Sysoev <igor@sysoev.ru>
parents:
380
diff
changeset
|
156 #endif |
d1222d46b3f9
nginx-0.0.7-2004-07-15-00:07:58 import
Igor Sysoev <igor@sysoev.ru>
parents:
380
diff
changeset
|
157 |
7633
5d91389e0fd3
Initial QUIC support in http.
Sergey Kandaurov <pluknet@nginx.com>
parents:
7590
diff
changeset
|
158 ngx_udp_connection_t *udp; |
7286 | 159 |
396
6f3b20c1ac50
nginx-0.0.7-2004-07-18-23:11:20 import
Igor Sysoev <igor@sysoev.ru>
parents:
393
diff
changeset
|
160 struct sockaddr *local_sockaddr; |
5463
1ab1cf63f885
Core: keep the length of the local sockaddr.
Ruslan Ermilov <ru@nginx.com>
parents:
5456
diff
changeset
|
161 socklen_t local_socklen; |
103
6dfda4cf5200
nginx-0.0.1-2003-06-11-19:28:34 import
Igor Sysoev <igor@sysoev.ru>
parents:
101
diff
changeset
|
162 |
396
6f3b20c1ac50
nginx-0.0.7-2004-07-18-23:11:20 import
Igor Sysoev <igor@sysoev.ru>
parents:
393
diff
changeset
|
163 ngx_buf_t *buffer; |
8
708f8bb772ec
nginx-0.0.1-2002-09-02-18:48:24 import
Igor Sysoev <igor@sysoev.ru>
parents:
7
diff
changeset
|
164 |
3880
e3cb8e27e413
reuse keepalive connections if there are no free worker connections
Igor Sysoev <igor@sysoev.ru>
parents:
3676
diff
changeset
|
165 ngx_queue_t queue; |
e3cb8e27e413
reuse keepalive connections if there are no free worker connections
Igor Sysoev <igor@sysoev.ru>
parents:
3676
diff
changeset
|
166 |
495 | 167 ngx_atomic_uint_t number; |
26
53cb81681040
nginx-0.0.1-2002-12-15-09:25:09 import
Igor Sysoev <igor@sysoev.ru>
parents:
24
diff
changeset
|
168 |
2888 | 169 ngx_uint_t requests; |
170 | |
829
362d156f0278
high level HTTP buffered flags should be on per-subrequest basis,
Igor Sysoev <igor@sysoev.ru>
parents:
641
diff
changeset
|
171 unsigned buffered:8; |
597 | 172 |
2560
a7443674e429
ignore EINVAL from setsockopt() on Solaris
Igor Sysoev <igor@sysoev.ru>
parents:
2512
diff
changeset
|
173 unsigned log_error:3; /* ngx_connection_log_error_e */ |
256
8e39cab6abd5
nginx-0.0.2-2004-02-10-19:23:38 import
Igor Sysoev <igor@sysoev.ru>
parents:
253
diff
changeset
|
174 |
396
6f3b20c1ac50
nginx-0.0.7-2004-07-18-23:11:20 import
Igor Sysoev <igor@sysoev.ru>
parents:
393
diff
changeset
|
175 unsigned timedout:1; |
583 | 176 unsigned error:1; |
177 unsigned destroyed:1; | |
452 | 178 |
1135
03f1133f24e8
close keep-alive connections in the shuting down processes
Igor Sysoev <igor@sysoev.ru>
parents:
829
diff
changeset
|
179 unsigned idle:1; |
3880
e3cb8e27e413
reuse keepalive connections if there are no free worker connections
Igor Sysoev <igor@sysoev.ru>
parents:
3676
diff
changeset
|
180 unsigned reusable:1; |
1135
03f1133f24e8
close keep-alive connections in the shuting down processes
Igor Sysoev <igor@sysoev.ru>
parents:
829
diff
changeset
|
181 unsigned close:1; |
6436 | 182 unsigned shared:1; |
1135
03f1133f24e8
close keep-alive connections in the shuting down processes
Igor Sysoev <igor@sysoev.ru>
parents:
829
diff
changeset
|
183 |
452 | 184 unsigned sendfile:1; |
185 unsigned sndlowat:1; | |
483 | 186 unsigned tcp_nodelay:2; /* ngx_connection_tcp_nodelay_e */ |
187 unsigned tcp_nopush:2; /* ngx_connection_tcp_nopush_e */ | |
452 | 188 |
5513
311803b21504
SPDY: body filter was replaced by c->send_chain() function.
Valentin Bartenev <vbart@nginx.com>
parents:
5498
diff
changeset
|
189 unsigned need_last_buf:1; |
311803b21504
SPDY: body filter was replaced by c->send_chain() function.
Valentin Bartenev <vbart@nginx.com>
parents:
5498
diff
changeset
|
190 |
6734
0c572ed91b36
Modules compatibility: compatibility with NGX_HAVE_FILE_AIO.
Maxim Dounin <mdounin@mdounin.ru>
parents:
6733
diff
changeset
|
191 #if (NGX_HAVE_AIO_SENDFILE || NGX_COMPAT) |
5498
d39a69427056
Allowed up to two EBUSY errors from sendfile().
Maxim Dounin <mdounin@mdounin.ru>
parents:
5463
diff
changeset
|
192 unsigned busy_count:2; |
3065 | 193 #endif |
194 | |
6733
adc2414856b1
Modules compatibility: compatibility with NGX_THREADS.
Maxim Dounin <mdounin@mdounin.ru>
parents:
6721
diff
changeset
|
195 #if (NGX_THREADS || NGX_COMPAT) |
6023
b550563ef96e
Added support for offloading Linux sendfile() in thread pools.
Valentin Bartenev <vbart@nginx.com>
parents:
6016
diff
changeset
|
196 ngx_thread_task_t *sendfile_task; |
b550563ef96e
Added support for offloading Linux sendfile() in thread pools.
Valentin Bartenev <vbart@nginx.com>
parents:
6016
diff
changeset
|
197 #endif |
0
4eff17414a43
nginx-0.0.1-2002-08-06-20:39:45 import
Igor Sysoev <igor@sysoev.ru>
parents:
diff
changeset
|
198 }; |
4eff17414a43
nginx-0.0.1-2002-08-06-20:39:45 import
Igor Sysoev <igor@sysoev.ru>
parents:
diff
changeset
|
199 |
4eff17414a43
nginx-0.0.1-2002-08-06-20:39:45 import
Igor Sysoev <igor@sysoev.ru>
parents:
diff
changeset
|
200 |
6129
187aa751ad62
Core: the ngx_set_connection_log() macro.
Vladimir Homutov <vl@nginx.com>
parents:
6031
diff
changeset
|
201 #define ngx_set_connection_log(c, l) \ |
187aa751ad62
Core: the ngx_set_connection_log() macro.
Vladimir Homutov <vl@nginx.com>
parents:
6031
diff
changeset
|
202 \ |
187aa751ad62
Core: the ngx_set_connection_log() macro.
Vladimir Homutov <vl@nginx.com>
parents:
6031
diff
changeset
|
203 c->log->file = l->file; \ |
187aa751ad62
Core: the ngx_set_connection_log() macro.
Vladimir Homutov <vl@nginx.com>
parents:
6031
diff
changeset
|
204 c->log->next = l->next; \ |
187aa751ad62
Core: the ngx_set_connection_log() macro.
Vladimir Homutov <vl@nginx.com>
parents:
6031
diff
changeset
|
205 c->log->writer = l->writer; \ |
187aa751ad62
Core: the ngx_set_connection_log() macro.
Vladimir Homutov <vl@nginx.com>
parents:
6031
diff
changeset
|
206 c->log->wdata = l->wdata; \ |
187aa751ad62
Core: the ngx_set_connection_log() macro.
Vladimir Homutov <vl@nginx.com>
parents:
6031
diff
changeset
|
207 if (!(c->log->log_level & NGX_LOG_DEBUG_CONNECTION)) { \ |
187aa751ad62
Core: the ngx_set_connection_log() macro.
Vladimir Homutov <vl@nginx.com>
parents:
6031
diff
changeset
|
208 c->log->log_level = l->log_level; \ |
187aa751ad62
Core: the ngx_set_connection_log() macro.
Vladimir Homutov <vl@nginx.com>
parents:
6031
diff
changeset
|
209 } |
187aa751ad62
Core: the ngx_set_connection_log() macro.
Vladimir Homutov <vl@nginx.com>
parents:
6031
diff
changeset
|
210 |
187aa751ad62
Core: the ngx_set_connection_log() macro.
Vladimir Homutov <vl@nginx.com>
parents:
6031
diff
changeset
|
211 |
6555
090a78da4f88
Belatedly changed the ngx_create_listening() prototype.
Ruslan Ermilov <ru@nginx.com>
parents:
6532
diff
changeset
|
212 ngx_listening_t *ngx_create_listening(ngx_conf_t *cf, struct sockaddr *sockaddr, |
2806 | 213 socklen_t socklen); |
7315
e7b2b907c0f8
Events: moved sockets cloning to ngx_event_init_conf().
Maxim Dounin <mdounin@mdounin.ru>
parents:
7286
diff
changeset
|
214 ngx_int_t ngx_clone_listening(ngx_cycle_t *cycle, ngx_listening_t *ls); |
219
f57597ec5249
nginx-0.0.1-2004-01-06-19:49:34 import
Igor Sysoev <igor@sysoev.ru>
parents:
218
diff
changeset
|
215 ngx_int_t ngx_set_inherited_sockets(ngx_cycle_t *cycle); |
218
05592fd7a436
nginx-0.0.1-2004-01-05-23:55:48 import
Igor Sysoev <igor@sysoev.ru>
parents:
216
diff
changeset
|
216 ngx_int_t ngx_open_listening_sockets(ngx_cycle_t *cycle); |
2802 | 217 void ngx_configure_listening_sockets(ngx_cycle_t *cycle); |
218
05592fd7a436
nginx-0.0.1-2004-01-05-23:55:48 import
Igor Sysoev <igor@sysoev.ru>
parents:
216
diff
changeset
|
218 void ngx_close_listening_sockets(ngx_cycle_t *cycle); |
417
0526206251f6
nginx-0.0.10-2004-09-07-19:29:22 import
Igor Sysoev <igor@sysoev.ru>
parents:
399
diff
changeset
|
219 void ngx_close_connection(ngx_connection_t *c); |
6220
5e6142609e48
Core: idle connections now closed only once on exiting.
Valentin Bartenev <vbart@nginx.com>
parents:
6153
diff
changeset
|
220 void ngx_close_idle_connections(ngx_cycle_t *cycle); |
2854
d788477f5a67
ngx_connection_local_sockaddr()
Igor Sysoev <igor@sysoev.ru>
parents:
2806
diff
changeset
|
221 ngx_int_t ngx_connection_local_sockaddr(ngx_connection_t *c, ngx_str_t *s, |
d788477f5a67
ngx_connection_local_sockaddr()
Igor Sysoev <igor@sysoev.ru>
parents:
2806
diff
changeset
|
222 ngx_uint_t port); |
7007
ed1101bbf19f
Introduced ngx_tcp_nodelay().
Ruslan Ermilov <ru@nginx.com>
parents:
6735
diff
changeset
|
223 ngx_int_t ngx_tcp_nodelay(ngx_connection_t *c); |
253
b6793bc5034b
nginx-0.0.2-2004-02-09-10:46:43 import
Igor Sysoev <igor@sysoev.ru>
parents:
219
diff
changeset
|
224 ngx_int_t ngx_connection_error(ngx_connection_t *c, ngx_err_t err, char *text); |
218
05592fd7a436
nginx-0.0.1-2004-01-05-23:55:48 import
Igor Sysoev <igor@sysoev.ru>
parents:
216
diff
changeset
|
225 |
543 | 226 ngx_connection_t *ngx_get_connection(ngx_socket_t s, ngx_log_t *log); |
227 void ngx_free_connection(ngx_connection_t *c); | |
91
637625a2acdb
nginx-0.0.1-2003-05-19-20:39:14 import
Igor Sysoev <igor@sysoev.ru>
parents:
87
diff
changeset
|
228 |
3880
e3cb8e27e413
reuse keepalive connections if there are no free worker connections
Igor Sysoev <igor@sysoev.ru>
parents:
3676
diff
changeset
|
229 void ngx_reusable_connection(ngx_connection_t *c, ngx_uint_t reusable); |
91
637625a2acdb
nginx-0.0.1-2003-05-19-20:39:14 import
Igor Sysoev <igor@sysoev.ru>
parents:
87
diff
changeset
|
230 |
0
4eff17414a43
nginx-0.0.1-2002-08-06-20:39:45 import
Igor Sysoev <igor@sysoev.ru>
parents:
diff
changeset
|
231 #endif /* _NGX_CONNECTION_H_INCLUDED_ */ |