X-Git-Url: http://git.silcnet.org/gitweb/?a=blobdiff_plain;f=lib%2Fsilcutil%2Fsilcsocketstream.h;h=a83a44b7963ba9e80fde1978d117dbf98307c4b5;hb=40f8443d8d3a6577336ee66d18e04d9ac4d956bb;hp=c75394a01d431ccac2c69c5fa4da1601398273e3;hpb=0f0340b9fbce9704cc7171f8f0104ce9103d2de6;p=silc.git diff --git a/lib/silcutil/silcsocketstream.h b/lib/silcutil/silcsocketstream.h index c75394a0..a83a44b7 100644 --- a/lib/silcutil/silcsocketstream.h +++ b/lib/silcutil/silcsocketstream.h @@ -26,6 +26,9 @@ * Stream provides also Quality of Service (QoS) support that can be used * to control the throughput of the stream. * + * SILC Socket Stream is not thread-safe. If the same socket stream must be + * used in multithreaded environment concurrency control must be employed. + * ***/ #ifndef SILCSOCKETSTREAM_H @@ -82,7 +85,8 @@ typedef void (*SilcSocketStreamCallback)(SilcSocketStreamStatus status, * SYNOPSIS * * SilcAsyncOperation - * silc_socket_stream_create(int sock, bool lookup, bool require_fqdn, + * silc_socket_stream_create(int sock, SilcBool lookup, + * SilcBool require_fqdn, * SilcSchedule schedule, * SilcSocketStreamCallback callback, * void *context); @@ -107,7 +111,8 @@ typedef void (*SilcSocketStreamCallback)(SilcSocketStreamStatus status, * ***/ SilcAsyncOperation -silc_socket_stream_create(int sock, bool lookup, bool require_fqdn, +silc_socket_stream_create(int sock, SilcBool lookup, + SilcBool require_fqdn, SilcSchedule schedule, SilcSocketStreamCallback callback, void *context); @@ -116,7 +121,7 @@ silc_socket_stream_create(int sock, bool lookup, bool require_fqdn, * * SYNOPSIS * - * bool + * SilcBool * silc_socket_stream_get_info(SilcStream stream, * int *sock, const char **hostname, * const char **ip, SilcUInt16 *port); @@ -128,15 +133,15 @@ silc_socket_stream_create(int sock, bool lookup, bool require_fqdn, * if these informations are not available. * ***/ -bool silc_socket_stream_get_info(SilcStream stream, - int *sock, const char **hostname, - const char **ip, SilcUInt16 *port); +SilcBool silc_socket_stream_get_info(SilcStream stream, + int *sock, const char **hostname, + const char **ip, SilcUInt16 *port); /****f* silcutil/SilcSocketStreamAPI/silc_socket_stream_set_info * * SYNOPSIS * - * bool + * SilcBool * silc_socket_stream_set_info(SilcStream stream, * const char *hostname, * const char *ip, SilcUInt16 port); @@ -152,9 +157,9 @@ bool silc_socket_stream_get_info(SilcStream stream, * silc_socket_stream_get_info to get the information from the stream. * ***/ -bool silc_socket_stream_set_info(SilcStream stream, - const char *hostname, - const char *ip, SilcUInt16 port); +SilcBool silc_socket_stream_set_info(SilcStream stream, + const char *hostname, + const char *ip, SilcUInt16 port); /****f* silcutil/SilcSocketStreamAPI/silc_socket_stream_get_error * @@ -174,11 +179,11 @@ int silc_socket_stream_get_error(SilcStream stream); * * SYNOPSIS * - * bool silc_socket_stream_set_qos(SilcStream stream, - * SilcUInt32 read_rate, - * SilcUInt32 read_limit_bytes, - * SilcUInt32 limit_sec, - * SilcUInt32 limit_usec) + * SilcBool silc_socket_stream_set_qos(SilcStream stream, + * SilcUInt32 read_rate, + * SilcUInt32 read_limit_bytes, + * SilcUInt32 limit_sec, + * SilcUInt32 limit_usec) * * DESCRIPTION * @@ -194,11 +199,11 @@ int silc_socket_stream_get_error(SilcStream stream); * this socket stream that may be pending will be cancelled. * ***/ -bool silc_socket_stream_set_qos(SilcStream stream, - SilcUInt32 read_rate, - SilcUInt32 read_limit_bytes, - SilcUInt32 limit_sec, - SilcUInt32 limit_usec); +SilcBool silc_socket_stream_set_qos(SilcStream stream, + SilcUInt32 read_rate, + SilcUInt32 read_limit_bytes, + SilcUInt32 limit_sec, + SilcUInt32 limit_usec); #include "silcsocketstream_i.h"