Mercurial > hg > nginx
diff 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 |
line wrap: on
line diff
--- a/src/core/ngx_connection.h +++ b/src/core/ngx_connection.h @@ -135,6 +135,8 @@ struct ngx_connection_s { ngx_buf_t *buffer; + ngx_queue_t queue; + ngx_atomic_uint_t number; ngx_uint_t requests; @@ -150,6 +152,7 @@ struct ngx_connection_s { unsigned destroyed:1; unsigned idle:1; + unsigned reusable:1; unsigned close:1; unsigned sendfile:1; @@ -186,5 +189,6 @@ ngx_int_t ngx_connection_error(ngx_conne ngx_connection_t *ngx_get_connection(ngx_socket_t s, ngx_log_t *log); void ngx_free_connection(ngx_connection_t *c); +void ngx_reusable_connection(ngx_connection_t *c, ngx_uint_t reusable); #endif /* _NGX_CONNECTION_H_INCLUDED_ */