Signed-off-by: Andy Green <andy.green@linaro.org>
return wsi->u.ws.rsv;
}
+/**
+ * libwebsocket_ensure_user_space(): return the user context for the connection if possible
+ * @wsi: websocket connection instance
+ */
+
void *
libwebsocket_ensure_user_space(struct libwebsocket *wsi)
{
+ if (!wsi->protocol)
+ return NULL;
+
/* allocate the per-connection user memory (if any) */
if (wsi->protocol->per_session_data_size && !wsi->user_space) {
this is how you can get a pointer to the active protocol if needed.
</blockquote>
<hr>
+<h2>libwebsocket_ensure_user_space - </h2>
+<i>void *</i>
+<b>libwebsocket_ensure_user_space</b>
+(<i>struct libwebsocket *</i> <b>wsi</b>)
+<h3>Arguments</h3>
+<dl>
+<dt><b>wsi</b>
+<dd>websocket connection instance
+</dl>
+<hr>
<h2>lws_set_log_level - Set the logging bitfield</h2>
<i>void</i>
<b>lws_set_log_level</b>