| #ifndef _NGX_EVENT_PROXY_H_INCLUDED_ |
| #define _NGX_EVENT_PROXY_H_INCLUDED_ |
| #include <ngx_connection.h> |
| typedef struct ngx_event_proxy_s ngx_event_proxy_t; |
| typedef int (*ngx_event_proxy_input_filter_pt)(ngx_event_proxy_t *p); |
| typedef int (*ngx_event_proxy_output_filter_pt)(void *data, ngx_hunk_t *hunk); |
| struct ngx_event_proxy_s { |
| ngx_chain_t *last_read_hunk; |
| ngx_chain_t *last_in_hunk; |
| ngx_chain_t *shadow_hunks; |
| ngx_chain_t *last_out_hunk; |
| ngx_event_proxy_input_filter_pt input_filter; |
| ngx_event_proxy_output_filter_pt output_filter; |
| unsigned block_upstream:1; |
| unsigned upstream_error:1; |
| ngx_connection_t *upstream; |
| ngx_connection_t *client; |
| int ngx_event_proxy_read_upstream(ngx_event_proxy_t *p); |
| int ngx_event_proxy_write_to_client(ngx_event_proxy_t *p); |
| int ngx_event_proxy_write_chain_to_temp_file(ngx_event_proxy_t *p); |
| #endif /* _NGX_EVENT_PROXY_H_INCLUDED_ */ |