nxt_stream_source.h (0:a63ceefd6ab0) nxt_stream_source.h (1:fdc027c56872)
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
11typedef struct nxt_stream_source_s nxt_stream_source_t;
12
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
11typedef struct nxt_stream_source_s nxt_stream_source_t;
12
13typedef void (*nxt_stream_source_handler_t)(nxt_stream_source_t *u);
13typedef void (*nxt_stream_source_handler_t)(nxt_task_t *task,
14 nxt_stream_source_t *s);
14
15struct 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
15
16struct nxt_stream_source_s {
17 nxt_event_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
28void nxt_stream_source_connect(nxt_stream_source_t *stream);
29void nxt_stream_source_connect(nxt_task_t *task, nxt_stream_source_t *stream);
29
30
31#endif /* _NXT_STREAM_SOURCE_H_INCLUDED_ */
30
31
32#endif /* _NXT_STREAM_SOURCE_H_INCLUDED_ */