Mercurial > hg > nginx-vendor-1-0
diff src/event/ngx_event_connect.h @ 260:0effe91f6083 NGINX_0_5_0
nginx 0.5.0
*) Change: the parameters in the "%name" form in the "log_format"
directive are not supported anymore.
*) Change: the "proxy_upstream_max_fails",
"proxy_upstream_fail_timeout", "fastcgi_upstream_max_fails",
"fastcgi_upstream_fail_timeout", "memcached_upstream_max_fails", and
"memcached_upstream_fail_timeout" directives are not supported
anymore.
*) Feature: the "server" directive in the "upstream" context supports
the "max_fails", "fail_timeout", and "down" parameters.
*) Feature: the "ip_hash" directive inside the "upstream" block.
*) Feature: the WAIT status in the "Auth-Status" header line of the
IMAP/POP3 proxy authentication server response.
*) Bugfix: nginx could not be built on 64-bit platforms; bug appeared
in 0.4.14.
author | Igor Sysoev <http://sysoev.ru> |
---|---|
date | Mon, 04 Dec 2006 00:00:00 +0300 |
parents | d2ae1c9f1fd3 |
children | fc223117327f |
line wrap: on
line diff
--- a/src/event/ngx_event_connect.h +++ b/src/event/ngx_event_connect.h @@ -13,27 +13,56 @@ #include <ngx_event.h> -typedef struct { - ngx_peers_t *peers; - ngx_uint_t cur_peer; - ngx_uint_t tries; +#define NGX_PEER_KEEPALIVE 1 +#define NGX_PEER_NEXT 2 +#define NGX_PEER_FAILED 4 + + +typedef struct ngx_peer_connection_s ngx_peer_connection_t; + +typedef ngx_int_t (*ngx_event_get_peer_pt)(ngx_peer_connection_t *pc, + void *data); +#if (NGX_SSL) +typedef void (*ngx_event_save_peer_pt)(ngx_peer_connection_t *pc, void *data); +#endif +typedef void (*ngx_event_free_peer_pt)(ngx_peer_connection_t *pc, void *data, + ngx_uint_t state); + - ngx_connection_t *connection; -#if (NGX_THREADS) - ngx_atomic_t *lock; +struct ngx_peer_connection_s { + ngx_connection_t *connection; + + struct sockaddr *sockaddr; + socklen_t socklen; + ngx_str_t *name; + + ngx_uint_t tries; + + ngx_event_get_peer_pt get; + ngx_event_free_peer_pt free; + void *data; + +#if (NGX_SSL) + ngx_ssl_session_t *ssl_session; + ngx_event_save_peer_pt save_session; #endif - int rcvbuf; +#if (NGX_THREADS) + ngx_atomic_t *lock; +#endif - ngx_log_t *log; + int rcvbuf; - unsigned cached:1; - unsigned log_error:2; /* ngx_connection_log_error_e */ -} ngx_peer_connection_t; + ngx_log_t *log; + + unsigned cached:1; + unsigned log_error:2; /* ngx_connection_log_error_e */ +}; ngx_int_t ngx_event_connect_peer(ngx_peer_connection_t *pc); -void ngx_event_connect_peer_failed(ngx_peer_connection_t *pc, ngx_uint_t down); +ngx_int_t ngx_event_get_peer(ngx_peer_connection_t *pc, void *data); + #endif /* _NGX_EVENT_CONNECT_H_INCLUDED_ */