X-Git-Url: http://git.silcnet.org/gitweb/?a=blobdiff_plain;f=lib%2Fsilcutil%2Fsilcfdstream.h;h=0b09fd3a520ed8f148d6cf56b7d09dcdca91057e;hb=40f8443d8d3a6577336ee66d18e04d9ac4d956bb;hp=9904fcac0dafcffe8290a8242084a0340fcb8ce8;hpb=7de70a77c609a4b286f6e1f69c6b55f5c19781d1;p=silc.git diff --git a/lib/silcutil/silcfdstream.h b/lib/silcutil/silcfdstream.h index 9904fcac..0b09fd3a 100644 --- a/lib/silcutil/silcfdstream.h +++ b/lib/silcutil/silcfdstream.h @@ -38,7 +38,7 @@ * * SYNOPSIS * - * SilcStream silc_fd_stream_create(int fd, SilcSchedule schedule); + * SilcStream silc_fd_stream_create(int fd); * * DESCRIPTION * @@ -46,15 +46,17 @@ * by `fd'. The stream is closed with the silc_stream_close and destroyed * with the silc_stream_destroy. * + * The silc_stream_set_notifier must be called in order to be able to read + * from and write to this file descriptor stream. + * ***/ -SilcStream silc_fd_stream_create(int fd, SilcSchedule schedule); +SilcStream silc_fd_stream_create(int fd); /****f* silcutil/SilcFDStreamAPI/silc_fd_stream_create2 * * SYNOPSIS * - * SilcStream silc_fd_stream_create2(int read_fd, int write_fd, - * SilcSchedule schedule); + * SilcStream silc_fd_stream_create2(int read_fd, int write_fd); * * DESCRIPTION * @@ -63,9 +65,32 @@ SilcStream silc_fd_stream_create(int fd, SilcSchedule schedule); * and `write_fd' opened for writing. The stream is closed with the * silc_stream_close and destroyed with the silc_stream_destroy. * + * The silc_stream_set_notifier must be called in order to be able to read + * from and write to this file descriptor stream. + * + ***/ +SilcStream silc_fd_stream_create2(int read_fd, int write_fd); + +/****f* silcutil/SilcFDStreamAPI/silc_fd_stream_file + * + * SYNOPSIS + * + * SilcStream silc_fd_stream_file(const char *filename, SilcBool reading, + * SilcBool writing); + * + * DESCRIPTION + * + * Same as silc_fd_stream_create but creates the stream by opening the + * file indicated by `filename'. If the `reading' is TRUE the file is + * opened for reading. If the `writing' is TRUE the file is opened + * for writing. + * + * The silc_stream_set_notifier must be called in order to be able to read + * from and write to this file descriptor stream. + * ***/ -SilcStream silc_fd_stream_create2(int read_fd, int write_fd, - SilcSchedule schedule); +SilcStream silc_fd_stream_file(const char *filename, SilcBool reading, + SilcBool writing); /****f* silcutil/SilcFDStreamAPI/silc_fd_stream_get_info * @@ -81,7 +106,8 @@ SilcStream silc_fd_stream_create2(int read_fd, int write_fd, * function. * ***/ -SilcBool silc_fd_stream_get_info(SilcStream stream, int *read_fd, int *write_fd); +SilcBool silc_fd_stream_get_info(SilcStream stream, + int *read_fd, int *write_fd); /****f* silcutil/SilcFDStreamAPI/silc_fd_stream_get_error *