comparison src/event/ngx_event_connect.h @ 320:1e9e2c5e7c14 NGINX_0_5_30

nginx 0.5.30 *) Feature: the $args variable can be set with the "set" directive. *) Feature: the $is_args variable. *) Bugfix: if a client has closed connection to mail proxy then nginx might not close connection to backend. *) Bugfix: now nginx escapes space in $memcached_key variable. *) Bugfix: a segmentation fault might occur in worker process when the HTTPS protocol was used in the "proxy_pass" directive. *) Bugfix: the perl $$ variable value in ngx_http_perl_module was equal to the master process identification number. *) Bugfix: fix building on Solaris/amd64 by Sun Studio 11 and early versions; bug appeared in 0.5.29.
author Igor Sysoev <http://sysoev.ru>
date Mon, 30 Jul 2007 00:00:00 +0400
parents 0effe91f6083
children
comparison
equal deleted inserted replaced
319:10d5a311cc5e 320:1e9e2c5e7c14
11 #include <ngx_config.h> 11 #include <ngx_config.h>
12 #include <ngx_core.h> 12 #include <ngx_core.h>
13 #include <ngx_event.h> 13 #include <ngx_event.h>
14 14
15 15
16 #define NGX_PEER_KEEPALIVE 1 16 #define NGX_PEER_KEEPALIVE 1
17 #define NGX_PEER_NEXT 2 17 #define NGX_PEER_NEXT 2
18 #define NGX_PEER_FAILED 4 18 #define NGX_PEER_FAILED 4
19 19
20 20
21 typedef struct ngx_peer_connection_s ngx_peer_connection_t; 21 typedef struct ngx_peer_connection_s ngx_peer_connection_t;
22 22
23 typedef ngx_int_t (*ngx_event_get_peer_pt)(ngx_peer_connection_t *pc, 23 typedef ngx_int_t (*ngx_event_get_peer_pt)(ngx_peer_connection_t *pc,
24 void *data); 24 void *data);
25 #if (NGX_SSL)
26 typedef void (*ngx_event_save_peer_pt)(ngx_peer_connection_t *pc, void *data);
27 #endif
28 typedef void (*ngx_event_free_peer_pt)(ngx_peer_connection_t *pc, void *data, 25 typedef void (*ngx_event_free_peer_pt)(ngx_peer_connection_t *pc, void *data,
29 ngx_uint_t state); 26 ngx_uint_t state);
27 #if (NGX_SSL)
28
29 typedef ngx_int_t (*ngx_event_set_peer_session_pt)(ngx_peer_connection_t *pc,
30 void *data);
31 typedef void (*ngx_event_save_peer_session_pt)(ngx_peer_connection_t *pc,
32 void *data);
33 #endif
30 34
31 35
32 struct ngx_peer_connection_s { 36 struct ngx_peer_connection_s {
33 ngx_connection_t *connection; 37 ngx_connection_t *connection;
34 38
35 struct sockaddr *sockaddr; 39 struct sockaddr *sockaddr;
36 socklen_t socklen; 40 socklen_t socklen;
37 ngx_str_t *name; 41 ngx_str_t *name;
38 42
39 ngx_uint_t tries; 43 ngx_uint_t tries;
40 44
41 ngx_event_get_peer_pt get; 45 ngx_event_get_peer_pt get;
42 ngx_event_free_peer_pt free; 46 ngx_event_free_peer_pt free;
43 void *data; 47 void *data;
44 48
45 #if (NGX_SSL) 49 #if (NGX_SSL)
46 ngx_ssl_session_t *ssl_session; 50 ngx_event_set_peer_session_pt set_session;
47 ngx_event_save_peer_pt save_session; 51 ngx_event_save_peer_session_pt save_session;
48 #endif 52 #endif
49 53
50 #if (NGX_THREADS) 54 #if (NGX_THREADS)
51 ngx_atomic_t *lock; 55 ngx_atomic_t *lock;
52 #endif 56 #endif
53 57
54 int rcvbuf; 58 int rcvbuf;
55 59
56 ngx_log_t *log; 60 ngx_log_t *log;
57 61
58 unsigned cached:1; 62 unsigned cached:1;
59 unsigned log_error:2; /* ngx_connection_log_error_e */ 63
64 /* ngx_connection_log_error_e */
65 unsigned log_error:2;
60 }; 66 };
61 67
62 68
63 ngx_int_t ngx_event_connect_peer(ngx_peer_connection_t *pc); 69 ngx_int_t ngx_event_connect_peer(ngx_peer_connection_t *pc);
64 ngx_int_t ngx_event_get_peer(ngx_peer_connection_t *pc, void *data); 70 ngx_int_t ngx_event_get_peer(ngx_peer_connection_t *pc, void *data);