+/* Return associated context. */
+
+void *
+silc_socket_stream_get_context(SilcStream stream)
+{
+ SilcSocketStream socket_stream = stream;
+
+ if (!SILC_IS_SOCKET_STREAM(socket_stream))
+ return NULL;
+
+ return socket_stream->user_context;
+}
+
+/* Set associated context. */
+
+void
+silc_socket_stream_set_context(SilcStream stream,
+ void *context)
+{
+ SilcSocketStream socket_stream = stream;
+
+ if (!SILC_IS_SOCKET_STREAM(socket_stream))
+ return;
+
+ socket_stream->user_context = context;
+}
+