comparison src/core/ngx_connection.h @ 3880:e3cb8e27e413

reuse keepalive connections if there are no free worker connections patch by Maxim Dounin
author Igor Sysoev <igor@sysoev.ru>
date Mon, 04 Apr 2011 12:26:53 +0000
parents 4430d110293e
children c4513d4dd024 4919fb357a5d
comparison
equal deleted inserted replaced
3879:502a6b0acf3f 3880:e3cb8e27e413
133 133
134 struct sockaddr *local_sockaddr; 134 struct sockaddr *local_sockaddr;
135 135
136 ngx_buf_t *buffer; 136 ngx_buf_t *buffer;
137 137
138 ngx_queue_t queue;
139
138 ngx_atomic_uint_t number; 140 ngx_atomic_uint_t number;
139 141
140 ngx_uint_t requests; 142 ngx_uint_t requests;
141 143
142 unsigned buffered:8; 144 unsigned buffered:8;
148 unsigned timedout:1; 150 unsigned timedout:1;
149 unsigned error:1; 151 unsigned error:1;
150 unsigned destroyed:1; 152 unsigned destroyed:1;
151 153
152 unsigned idle:1; 154 unsigned idle:1;
155 unsigned reusable:1;
153 unsigned close:1; 156 unsigned close:1;
154 157
155 unsigned sendfile:1; 158 unsigned sendfile:1;
156 unsigned sndlowat:1; 159 unsigned sndlowat:1;
157 unsigned tcp_nodelay:2; /* ngx_connection_tcp_nodelay_e */ 160 unsigned tcp_nodelay:2; /* ngx_connection_tcp_nodelay_e */
184 ngx_int_t ngx_connection_error(ngx_connection_t *c, ngx_err_t err, char *text); 187 ngx_int_t ngx_connection_error(ngx_connection_t *c, ngx_err_t err, char *text);
185 188
186 ngx_connection_t *ngx_get_connection(ngx_socket_t s, ngx_log_t *log); 189 ngx_connection_t *ngx_get_connection(ngx_socket_t s, ngx_log_t *log);
187 void ngx_free_connection(ngx_connection_t *c); 190 void ngx_free_connection(ngx_connection_t *c);
188 191
192 void ngx_reusable_connection(ngx_connection_t *c, ngx_uint_t reusable);
189 193
190 #endif /* _NGX_CONNECTION_H_INCLUDED_ */ 194 #endif /* _NGX_CONNECTION_H_INCLUDED_ */