* 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);
* 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,
*
* 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,
SilcUInt32 limit_sec,
SilcUInt32 limit_usec);
+
+/****f* silcutil/SilcSocketStreamAPI/silc_socket_stream_get_context
+ *
+ * SYNOPSIS
+ *
+ * void *
+ * silc_socket_stream_get_context(SilcSocketStream stream);
+ *
+ * DESCRIPTION
+ *
+ * Returns the context associated with a stream. This context is
+ * set via silc_socket_stream_set_context.
+ *
+ ***/
+void *
+silc_socket_stream_get_context(SilcStream stream);
+
+/****f* silcutil/SilcSocketStreamAPI/silc_socket_stream_set_context
+ *
+ * SYNOPSIS
+ *
+ * void
+ * silc_socket_stream_set_context(SilcSocketStream stream,
+ * void *context);
+ *
+ * DESCRIPTION
+ *
+ * Returns the context associated with a stream. This context is
+ * set via silc_socket_stream_set_context.
+ *
+ ***/
+void
+silc_socket_stream_set_context(SilcStream stream,
+ void *context);
+
#include "silcsocketstream_i.h"
#endif /* SILCSOCKETSTREAM_H */