Mercurial > hg > nginx
comparison src/event/ngx_event_proxy.h @ 75:869b10be682f
nginx-0.0.1-2003-04-14-21:04:58 import
author | Igor Sysoev <igor@sysoev.ru> |
---|---|
date | Mon, 14 Apr 2003 17:04:58 +0000 |
parents | |
children | 6127d7075471 |
comparison
equal
deleted
inserted
replaced
74:17ab1af8c3dd | 75:869b10be682f |
---|---|
1 #ifndef _NGX_EVENT_PROXY_H_INCLUDED_ | |
2 #define _NGX_EVENT_PROXY_H_INCLUDED_ | |
3 | |
4 | |
5 #include <ngx_config.h> | |
6 #include <ngx_core.h> | |
7 #include <ngx_hunk.h> | |
8 #include <ngx_file.h> | |
9 #include <ngx_files.h> | |
10 #include <ngx_connection.h> | |
11 | |
12 | |
13 typedef struct ngx_event_proxy_s ngx_event_proxy_t; | |
14 | |
15 typedef int (*ngx_event_proxy_input_filter_pt)(ngx_event_proxy_t *p); | |
16 typedef int (*ngx_event_proxy_output_filter_pt)(void *data, ngx_hunk_t *hunk); | |
17 | |
18 | |
19 struct ngx_event_proxy_s { | |
20 ngx_chain_t *read_hunks; | |
21 ngx_chain_t *last_read_hunk; | |
22 ngx_chain_t *in_hunks; | |
23 ngx_chain_t *last_in_hunk; | |
24 ngx_chain_t *shadow_hunks; | |
25 ngx_chain_t *out_hunks; | |
26 ngx_chain_t *last_out_hunk; | |
27 ngx_chain_t *free_hunks; | |
28 ngx_hunk_t *busy_hunk; | |
29 | |
30 ngx_event_proxy_input_filter_pt input_filter; | |
31 void *input_data; | |
32 | |
33 ngx_event_proxy_output_filter_pt output_filter; | |
34 void *output_data; | |
35 | |
36 unsigned cachable:1; | |
37 unsigned block_upstream:1; | |
38 unsigned upstream_eof:1; | |
39 unsigned upstream_error:1; | |
40 unsigned client_eof:1; | |
41 unsigned client_error:1; | |
42 | |
43 int level; | |
44 | |
45 int allocated; | |
46 int block_size; | |
47 int max_block_size; | |
48 | |
49 off_t temp_offset; | |
50 off_t max_temp_size; | |
51 int file_block_size; | |
52 | |
53 ngx_connection_t *upstream; | |
54 ngx_connection_t *client; | |
55 | |
56 ngx_pool_t *pool; | |
57 ngx_log_t *log; | |
58 | |
59 ngx_file_t *temp_file; | |
60 ngx_path_t *temp_path; | |
61 int number; | |
62 int random; | |
63 char *temp_file_warn; | |
64 }; | |
65 | |
66 | |
67 int ngx_event_proxy_read_upstream(ngx_event_proxy_t *p); | |
68 int ngx_event_proxy_write_to_client(ngx_event_proxy_t *p); | |
69 int ngx_event_proxy_write_chain_to_temp_file(ngx_event_proxy_t *p); | |
70 | |
71 | |
72 #endif /* _NGX_EVENT_PROXY_H_INCLUDED_ */ |