ea37a9aedfc3a6ff5f4ea10bc4eff4ca23f62a15Timo Sirainen/* Tee can be used to create multiple child input streams which can access
ea37a9aedfc3a6ff5f4ea10bc4eff4ca23f62a15Timo Sirainen a single non-blocking input stream in a way that data isn't removed from
ea37a9aedfc3a6ff5f4ea10bc4eff4ca23f62a15Timo Sirainen memory until all child streams have consumed the input.
ea37a9aedfc3a6ff5f4ea10bc4eff4ca23f62a15Timo Sirainen If the stream's buffer gets full because some child isn't consuming the
ea37a9aedfc3a6ff5f4ea10bc4eff4ca23f62a15Timo Sirainen data, other streams get returned 0 by i_stream_read(). */
fe363b433b8038a69b55169da9dca27892ad7d18Timo Sirainenstruct tee_istream *tee_i_stream_create(struct istream *input);
34435ce4a468dc13b23db69dbdd09fe20be88816Timo Sirainen/* Returns TRUE if last read() operation returned 0, because it was waiting
34435ce4a468dc13b23db69dbdd09fe20be88816Timo Sirainen for another tee stream to read more of its data. */
34435ce4a468dc13b23db69dbdd09fe20be88816Timo Sirainenbool tee_i_stream_child_is_waiting(struct istream *input);