1 2 /* 3 * Copyright (C) Igor Sysoev 4 * Copyright (C) NGINX, Inc. 5 */ 6 7 #ifndef _NXT_STREAM_SOURCE_H_INCLUDED_ 8 #define _NXT_STREAM_SOURCE_H_INCLUDED_ 9 10 11 typedef struct nxt_stream_source_s nxt_stream_source_t; 12 13 typedef void (*nxt_stream_source_handler_t)(nxt_task_t *task, 14 nxt_stream_source_t *s); 15 16 struct nxt_stream_source_s { 17 nxt_conn_t *conn; 18 nxt_source_hook_t *next; 19 nxt_upstream_source_t *upstream; 20 21 nxt_buf_t *out; 22 23 uint32_t read_queued; /* 1 bit */ 24 25 nxt_stream_source_handler_t error_handler; 26 }; 27 28 29 void nxt_stream_source_connect(nxt_task_t *task, nxt_stream_source_t *stream); 30 31 32 #endif /* _NXT_STREAM_SOURCE_H_INCLUDED_ */ 33