From: Pekka Riikonen Date: Wed, 9 May 2007 19:46:47 +0000 (+0000) Subject: Improved documentation. X-Git-Tag: silc.toolkit.1.1.beta2~10 X-Git-Url: http://git.silcnet.org/gitweb/?p=silc.git;a=commitdiff_plain;h=6b558e0cc2b268c238ac4ec2beae62f3ba1fe8dd Improved documentation. --- diff --git a/lib/silcutil/silcsocketstream.c b/lib/silcutil/silcsocketstream.c index d3673269..3140b6d9 100644 --- a/lib/silcutil/silcsocketstream.c +++ b/lib/silcutil/silcsocketstream.c @@ -72,7 +72,7 @@ SILC_TASK_CALLBACK(silc_socket_host_lookup_finish) } if (lookup->status != SILC_SOCKET_OK) { - SILC_LOG_DEBUG(("Socket stream failed")); + SILC_LOG_DEBUG(("Socket stream lookup failed")); stream->schedule = NULL; silc_socket_stream_destroy(stream); stream = lookup->stream = NULL; diff --git a/lib/silcutil/silcsocketstream.h b/lib/silcutil/silcsocketstream.h index 6bbde63a..e9fd4357 100644 --- a/lib/silcutil/silcsocketstream.h +++ b/lib/silcutil/silcsocketstream.h @@ -78,6 +78,9 @@ typedef enum { * functions can also be used to read data, send data, and otherwise * handle the stream. * + * If the silc_stream_set_notifier is called the stream will be set to + * non-blocking mode. + * ***/ typedef void (*SilcSocketStreamCallback)(SilcSocketStreamStatus status, SilcStream stream, void *context); @@ -112,6 +115,9 @@ typedef void (*SilcSocketStreamCallback)(SilcSocketStreamStatus status, * will not be available from the socket stream. In that case this will * also return NULL as the `callback' is called immediately. * + * If the silc_stream_set_notifier is called the stream is set to + * non-blocking mode. + * ***/ SilcAsyncOperation silc_socket_tcp_stream_create(SilcSocket sock, SilcBool lookup, @@ -152,6 +158,9 @@ silc_socket_tcp_stream_create(SilcSocket sock, SilcBool lookup, * * This function returns the created SilcStream or NULL on error. * + * If the silc_stream_set_notifier is called the stream is set to + * non-blocking mode. + * ***/ SilcStream silc_socket_udp_stream_create(SilcSocket sock, SilcBool ipv6, diff --git a/lib/silcutil/silcstream.h b/lib/silcutil/silcstream.h index 4c8c0eb6..3067313b 100644 --- a/lib/silcutil/silcstream.h +++ b/lib/silcutil/silcstream.h @@ -4,7 +4,7 @@ Author: Pekka Riikonen - Copyright (C) 2005 - 2006 Pekka Riikonen + Copyright (C) 2005 - 2007 Pekka Riikonen This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -242,12 +242,12 @@ void silc_stream_destroy(SilcStream stream); * * DESCRIPTION * - * Set a notifier callback for the stream indicated by `stream' to be called - * when some action takes place on the stream. This effectively means - * scheduling the stream for various actions, that then eventually will - * be delivered to caller in the `notifier' callback. It is called for - * example when data is available for reading or writing, or if an error - * occurs. This can be called at any time for valid stream. + * Schedule `stream' for stream events. Set the `notifier' callback to + * be called when some event takes place on the stream. The event will + * be delievered to the `notifier' callback with the `context'. It is + * called for example when data is available for reading or writing, or + * if an error occurs. This can be called at any time for valid stream. + * This call will also set the `stream' into non-blocking mode. * * If `notifier' is set to NULL no callback will be called for the stream, * and the stream is not scheduled anymore.