Mercurial > hg > nginx
comparison src/event/ngx_event_proxy.h @ 148:5afee0074707
nginx-0.0.1-2003-10-17-00:19:16 import
author | Igor Sysoev <igor@sysoev.ru> |
---|---|
date | Thu, 16 Oct 2003 20:19:16 +0000 |
parents | be71fca7f9d7 |
children | ad5f382c9e7d |
comparison
equal
deleted
inserted
replaced
147:be71fca7f9d7 | 148:5afee0074707 |
---|---|
8 | 8 |
9 | 9 |
10 typedef struct ngx_event_proxy_s ngx_event_proxy_t; | 10 typedef struct ngx_event_proxy_s ngx_event_proxy_t; |
11 | 11 |
12 typedef int (*ngx_event_proxy_input_filter_pt)(ngx_event_proxy_t *p, | 12 typedef int (*ngx_event_proxy_input_filter_pt)(ngx_event_proxy_t *p, |
13 ngx_chain_t *chain); | 13 ngx_hunk_t *hunk); |
14 typedef int (*ngx_event_proxy_output_filter_pt)(void *data, ngx_hunk_t *hunk); | 14 typedef int (*ngx_event_proxy_output_filter_pt)(void *data, ngx_hunk_t *hunk); |
15 | 15 |
16 | 16 |
17 struct ngx_event_proxy_s { | 17 struct ngx_event_proxy_s { |
18 ngx_chain_t *read_hunks; | 18 ngx_chain_t *free_raw_hunks; |
19 ngx_chain_t *last_read_hunk; | 19 ngx_chain_t *in; |
20 ngx_chain_t **last_in; | |
20 | 21 |
21 ngx_chain_t *file_hunks; | 22 ngx_chain_t *out; |
23 ngx_chain_t **last_out; | |
22 | 24 |
23 ngx_chain_t *in_hunks; | 25 ngx_chain_t *free; |
24 ngx_chain_t *last_in_hunk; | 26 ngx_chain_t *busy; |
25 | 27 |
26 ngx_chain_t *out_hunks; | 28 /* |
27 ngx_chain_t *last_out_hunk; | 29 * the input filter i.e. that moves HTTP/1.1 chunks |
30 * from the raw hunks to an incoming chain | |
31 */ | |
28 | 32 |
29 ngx_chain_t *free_hunks; | 33 ngx_event_proxy_input_filter_pt input_filter; |
30 #if 0 | 34 void *input_ctx; |
31 ngx_chain_t *last_free_hunk; | |
32 #endif | |
33 | 35 |
34 ngx_hunk_t *busy_hunk; | 36 ngx_event_proxy_output_filter_pt output_filter; |
35 | 37 void *output_ctx; |
36 ngx_event_proxy_input_filter_pt input_filter; | |
37 void *input_data; | |
38 | |
39 ngx_event_proxy_output_filter_pt output_filter; | |
40 void *output_data; | |
41 | 38 |
42 unsigned cachable:1; | 39 unsigned cachable:1; |
43 unsigned block_upstream:1; | 40 unsigned upstream_done:1; |
44 unsigned upstream_eof:1; | 41 unsigned upstream_eof:1; |
45 unsigned upstream_error:1; | 42 unsigned upstream_error:1; |
46 unsigned downstream_eof:1; | 43 unsigned downstream_done:1; |
47 unsigned downstream_error:1; | 44 unsigned downstream_error:1; |
48 | 45 |
49 int upstream_level; | 46 int upstream_level; |
50 int downstream_level; | 47 int downstream_level; |
51 | 48 |
52 int hunks; | 49 int hunks; |
53 ngx_bufs_t bufs; | 50 ngx_bufs_t bufs; |
51 | |
52 size_t busy_len; | |
53 size_t max_busy_len; | |
54 | 54 |
55 off_t temp_offset; | 55 off_t temp_offset; |
56 off_t max_temp_file_size; | 56 off_t max_temp_file_size; |
57 int temp_file_write_size; | 57 int temp_file_write_size; |
58 | 58 |
61 | 61 |
62 ngx_pool_t *pool; | 62 ngx_pool_t *pool; |
63 ngx_log_t *log; | 63 ngx_log_t *log; |
64 | 64 |
65 ngx_chain_t *preread_hunks; | 65 ngx_chain_t *preread_hunks; |
66 #if 0 | |
67 ngx_chain_t *last_preread_hunk; | |
68 #endif | |
69 int preread_size; | 66 int preread_size; |
70 | 67 |
71 ngx_file_t *temp_file; | 68 ngx_file_t *temp_file; |
72 ngx_path_t *temp_path; | 69 ngx_path_t *temp_path; |
73 char *temp_file_warn; | 70 char *temp_file_warn; |
74 }; | 71 }; |
75 | 72 |
76 | 73 |
77 int ngx_event_proxy_read_upstream(ngx_event_proxy_t *p); | 74 int ngx_event_proxy_read_upstream(ngx_event_proxy_t *p); |
78 int ngx_event_proxy_write_to_downstream(ngx_event_proxy_t *p); | 75 int ngx_event_proxy_write_to_downstream(ngx_event_proxy_t *p); |
79 int ngx_event_proxy_copy_input_filter(ngx_event_proxy_t *p, ngx_chain_t *chain); | 76 int ngx_event_proxy_copy_input_filter(ngx_event_proxy_t *p, ngx_hunk_t *hunk); |
80 | 77 |
81 | 78 |
82 #endif /* _NGX_EVENT_PROXY_H_INCLUDED_ */ | 79 #endif /* _NGX_EVENT_PROXY_H_INCLUDED_ */ |