Mercurial > hg > nginx
annotate src/event/ngx_event_connect.h @ 2724:9fd2f12fee0a
fix Win32 ngx_gettimezone()
author | Igor Sysoev <igor@sysoev.ru> |
---|---|
date | Sun, 19 Apr 2009 19:08:49 +0000 |
parents | be2b895d31e0 |
children | ebcee0063cd8 |
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:
419
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:
419
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 |
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:
419
diff
changeset
|
4 */ |
da8c5707af39
nginx-0.1.0-2004-09-28-12:34:51 import; set copyright and remove unused files
Igor Sysoev <igor@sysoev.ru>
parents:
419
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:
419
diff
changeset
|
6 |
86
3973260705cc
nginx-0.0.1-2003-05-12-19:52:24 import
Igor Sysoev <igor@sysoev.ru>
parents:
diff
changeset
|
7 #ifndef _NGX_EVENT_CONNECT_H_INCLUDED_ |
3973260705cc
nginx-0.0.1-2003-05-12-19:52:24 import
Igor Sysoev <igor@sysoev.ru>
parents:
diff
changeset
|
8 #define _NGX_EVENT_CONNECT_H_INCLUDED_ |
3973260705cc
nginx-0.0.1-2003-05-12-19:52:24 import
Igor Sysoev <igor@sysoev.ru>
parents:
diff
changeset
|
9 |
3973260705cc
nginx-0.0.1-2003-05-12-19:52:24 import
Igor Sysoev <igor@sysoev.ru>
parents:
diff
changeset
|
10 |
3973260705cc
nginx-0.0.1-2003-05-12-19:52:24 import
Igor Sysoev <igor@sysoev.ru>
parents:
diff
changeset
|
11 #include <ngx_config.h> |
119
cd54bcbaf3b5
nginx-0.0.1-2003-07-21-01:15:59 import
Igor Sysoev <igor@sysoev.ru>
parents:
86
diff
changeset
|
12 #include <ngx_core.h> |
86
3973260705cc
nginx-0.0.1-2003-05-12-19:52:24 import
Igor Sysoev <igor@sysoev.ru>
parents:
diff
changeset
|
13 #include <ngx_event.h> |
3973260705cc
nginx-0.0.1-2003-05-12-19:52:24 import
Igor Sysoev <igor@sysoev.ru>
parents:
diff
changeset
|
14 |
3973260705cc
nginx-0.0.1-2003-05-12-19:52:24 import
Igor Sysoev <igor@sysoev.ru>
parents:
diff
changeset
|
15 |
1284
be2b895d31e0
fix segfault when session was freed twice
Igor Sysoev <igor@sysoev.ru>
parents:
884
diff
changeset
|
16 #define NGX_PEER_KEEPALIVE 1 |
be2b895d31e0
fix segfault when session was freed twice
Igor Sysoev <igor@sysoev.ru>
parents:
884
diff
changeset
|
17 #define NGX_PEER_NEXT 2 |
be2b895d31e0
fix segfault when session was freed twice
Igor Sysoev <igor@sysoev.ru>
parents:
884
diff
changeset
|
18 #define NGX_PEER_FAILED 4 |
884 | 19 |
20 | |
21 typedef struct ngx_peer_connection_s ngx_peer_connection_t; | |
22 | |
23 typedef ngx_int_t (*ngx_event_get_peer_pt)(ngx_peer_connection_t *pc, | |
24 void *data); | |
25 typedef void (*ngx_event_free_peer_pt)(ngx_peer_connection_t *pc, void *data, | |
26 ngx_uint_t state); | |
1284
be2b895d31e0
fix segfault when session was freed twice
Igor Sysoev <igor@sysoev.ru>
parents:
884
diff
changeset
|
27 #if (NGX_SSL) |
be2b895d31e0
fix segfault when session was freed twice
Igor Sysoev <igor@sysoev.ru>
parents:
884
diff
changeset
|
28 |
be2b895d31e0
fix segfault when session was freed twice
Igor Sysoev <igor@sysoev.ru>
parents:
884
diff
changeset
|
29 typedef ngx_int_t (*ngx_event_set_peer_session_pt)(ngx_peer_connection_t *pc, |
be2b895d31e0
fix segfault when session was freed twice
Igor Sysoev <igor@sysoev.ru>
parents:
884
diff
changeset
|
30 void *data); |
be2b895d31e0
fix segfault when session was freed twice
Igor Sysoev <igor@sysoev.ru>
parents:
884
diff
changeset
|
31 typedef void (*ngx_event_save_peer_session_pt)(ngx_peer_connection_t *pc, |
be2b895d31e0
fix segfault when session was freed twice
Igor Sysoev <igor@sysoev.ru>
parents:
884
diff
changeset
|
32 void *data); |
be2b895d31e0
fix segfault when session was freed twice
Igor Sysoev <igor@sysoev.ru>
parents:
884
diff
changeset
|
33 #endif |
884 | 34 |
119
cd54bcbaf3b5
nginx-0.0.1-2003-07-21-01:15:59 import
Igor Sysoev <igor@sysoev.ru>
parents:
86
diff
changeset
|
35 |
884 | 36 struct ngx_peer_connection_s { |
1284
be2b895d31e0
fix segfault when session was freed twice
Igor Sysoev <igor@sysoev.ru>
parents:
884
diff
changeset
|
37 ngx_connection_t *connection; |
884 | 38 |
1284
be2b895d31e0
fix segfault when session was freed twice
Igor Sysoev <igor@sysoev.ru>
parents:
884
diff
changeset
|
39 struct sockaddr *sockaddr; |
be2b895d31e0
fix segfault when session was freed twice
Igor Sysoev <igor@sysoev.ru>
parents:
884
diff
changeset
|
40 socklen_t socklen; |
be2b895d31e0
fix segfault when session was freed twice
Igor Sysoev <igor@sysoev.ru>
parents:
884
diff
changeset
|
41 ngx_str_t *name; |
884 | 42 |
1284
be2b895d31e0
fix segfault when session was freed twice
Igor Sysoev <igor@sysoev.ru>
parents:
884
diff
changeset
|
43 ngx_uint_t tries; |
884 | 44 |
1284
be2b895d31e0
fix segfault when session was freed twice
Igor Sysoev <igor@sysoev.ru>
parents:
884
diff
changeset
|
45 ngx_event_get_peer_pt get; |
be2b895d31e0
fix segfault when session was freed twice
Igor Sysoev <igor@sysoev.ru>
parents:
884
diff
changeset
|
46 ngx_event_free_peer_pt free; |
be2b895d31e0
fix segfault when session was freed twice
Igor Sysoev <igor@sysoev.ru>
parents:
884
diff
changeset
|
47 void *data; |
884 | 48 |
49 #if (NGX_SSL) | |
1284
be2b895d31e0
fix segfault when session was freed twice
Igor Sysoev <igor@sysoev.ru>
parents:
884
diff
changeset
|
50 ngx_event_set_peer_session_pt set_session; |
be2b895d31e0
fix segfault when session was freed twice
Igor Sysoev <igor@sysoev.ru>
parents:
884
diff
changeset
|
51 ngx_event_save_peer_session_pt save_session; |
377
41437e4fd9b4
nginx-0.0.7-2004-07-05-19:08:23 import
Igor Sysoev <igor@sysoev.ru>
parents:
288
diff
changeset
|
52 #endif |
120
b776ad95d96d
nginx-0.0.1-2003-07-21-20:24:25 import
Igor Sysoev <igor@sysoev.ru>
parents:
119
diff
changeset
|
53 |
884 | 54 #if (NGX_THREADS) |
1284
be2b895d31e0
fix segfault when session was freed twice
Igor Sysoev <igor@sysoev.ru>
parents:
884
diff
changeset
|
55 ngx_atomic_t *lock; |
884 | 56 #endif |
121
b3655b21375a
nginx-0.0.1-2003-07-22-23:53:10 import
Igor Sysoev <igor@sysoev.ru>
parents:
120
diff
changeset
|
57 |
1284
be2b895d31e0
fix segfault when session was freed twice
Igor Sysoev <igor@sysoev.ru>
parents:
884
diff
changeset
|
58 int rcvbuf; |
be2b895d31e0
fix segfault when session was freed twice
Igor Sysoev <igor@sysoev.ru>
parents:
884
diff
changeset
|
59 |
be2b895d31e0
fix segfault when session was freed twice
Igor Sysoev <igor@sysoev.ru>
parents:
884
diff
changeset
|
60 ngx_log_t *log; |
124
842a78cebbb7
nginx-0.0.1-2003-08-01-18:56:33 import
Igor Sysoev <igor@sysoev.ru>
parents:
121
diff
changeset
|
61 |
1284
be2b895d31e0
fix segfault when session was freed twice
Igor Sysoev <igor@sysoev.ru>
parents:
884
diff
changeset
|
62 unsigned cached:1; |
884 | 63 |
1284
be2b895d31e0
fix segfault when session was freed twice
Igor Sysoev <igor@sysoev.ru>
parents:
884
diff
changeset
|
64 /* ngx_connection_log_error_e */ |
be2b895d31e0
fix segfault when session was freed twice
Igor Sysoev <igor@sysoev.ru>
parents:
884
diff
changeset
|
65 unsigned log_error:2; |
884 | 66 }; |
86
3973260705cc
nginx-0.0.1-2003-05-12-19:52:24 import
Igor Sysoev <igor@sysoev.ru>
parents:
diff
changeset
|
67 |
3973260705cc
nginx-0.0.1-2003-05-12-19:52:24 import
Igor Sysoev <igor@sysoev.ru>
parents:
diff
changeset
|
68 |
461 | 69 ngx_int_t ngx_event_connect_peer(ngx_peer_connection_t *pc); |
884 | 70 ngx_int_t ngx_event_get_peer(ngx_peer_connection_t *pc, void *data); |
71 | |
136
da00cde00e8a
nginx-0.0.1-2003-10-02-09:39:37 import
Igor Sysoev <igor@sysoev.ru>
parents:
124
diff
changeset
|
72 |
da00cde00e8a
nginx-0.0.1-2003-10-02-09:39:37 import
Igor Sysoev <igor@sysoev.ru>
parents:
124
diff
changeset
|
73 |
86
3973260705cc
nginx-0.0.1-2003-05-12-19:52:24 import
Igor Sysoev <igor@sysoev.ru>
parents:
diff
changeset
|
74 #endif /* _NGX_EVENT_CONNECT_H_INCLUDED_ */ |