Fix crash on expired keyboard prompts
[silc.git] / lib / silcutil / silcsocketstream.h
index 6bbde63aa5a982c51be76d5f9b5aba8e314527c7..264668ca2aedcc182abd53c7a26143121e83f5a5 100644 (file)
@@ -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,
@@ -266,6 +275,41 @@ SilcBool silc_socket_stream_set_qos(SilcStream stream,
                                    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 */