xref: /unit/src/nxt_stream_source.h (revision 0:a63ceefd6ab0)
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_stream_source_t *u);
14 
15 struct nxt_stream_source_s {
16     nxt_event_conn_t             *conn;
17     nxt_source_hook_t            *next;
18     nxt_upstream_source_t        *upstream;
19 
20     nxt_buf_t                    *out;
21 
22     uint32_t                     read_queued;  /* 1 bit */
23 
24     nxt_stream_source_handler_t  error_handler;
25 };
26 
27 
28 void nxt_stream_source_connect(nxt_stream_source_t *stream);
29 
30 
31 #endif /* _NXT_STREAM_SOURCE_H_INCLUDED_ */
32