1
0
Fork 0
mirror of https://github.com/warmcat/libwebsockets.git synced 2025-03-09 00:00:04 +01:00

update document for lws_get_context

This commit is contained in:
Young 2016-05-31 21:50:22 +08:00 committed by Andy Green
parent d3c33936b5
commit 261f23622c
2 changed files with 26 additions and 0 deletions

View file

@ -1325,6 +1325,16 @@ lws_get_fops(struct lws_context *context)
return &context->fops;
}
/**
* lws_get_context - Allow geting lws_context from a Websocket connection
* instance
*
* With this function, users can access context in the callback function.
* Otherwise users may have to declare context as a global variable.
*
* @wsi: Websocket connection instance
*/
LWS_VISIBLE LWS_EXTERN struct lws_context *
lws_get_context(const struct lws *wsi)
{

View file

@ -696,6 +696,22 @@ This is never set at the start of a writeable callback, but any write
may set it.
</blockquote>
<hr>
<h2>lws_get_context - Allow geting lws_context from a Websocket connection instance</h2>
<i>LWS_EXTERN struct lws_context *</i>
<b>lws_get_context</b>
(<i>const struct lws *</i> <b>wsi</b>)
<h3>Arguments</h3>
<dl>
<dt><b>wsi</b>
<dd>Websocket connection instance
</dl>
<h3>Description</h3>
<blockquote>
<p>
With this function, users can access context in the callback function.
Otherwise users may have to declare context as a global variable.
</blockquote>
<hr>
<h2>lws_parse_uri - </h2>
<i>LWS_EXTERN int</i>
<b>lws_parse_uri</b>