silc_fd_stream_create2

SYNOPSIS

    SilcStream silc_fd_stream_create2(int read_fd, int write_fd,
                                      SilcStack stack);

DESCRIPTION

Creates file descriptor stream for the open file descriptors indicated by `read_fd' and `write_fd'. The `read_fd' must be opened for reading and `write_fd' opened for writing. The stream is closed with the silc_stream_close and destroyed with the silc_stream_destroy. Returns NULL if system is out of memory.

If the silc_stream_set_notifier is called the stream is set to non-blocking mode.

If `stack' is non-NULL all memory is allocated from the `stack' and will be released back to `stack' after the stream is destroyed.