123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449 |
- <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
- <html xmlns="http://www.w3.org/1999/xhtml">
- <head>
- <meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
- <meta http-equiv="X-UA-Compatible" content="IE=9"/>
- <meta name="generator" content="Doxygen 1.8.11"/>
- <title>libwebsockets: Extensions</title>
- <link href="tabs.css" rel="stylesheet" type="text/css"/>
- <script type="text/javascript" src="jquery.js"></script>
- <script type="text/javascript" src="dynsections.js"></script>
- <link href="navtree.css" rel="stylesheet" type="text/css"/>
- <script type="text/javascript" src="resize.js"></script>
- <script type="text/javascript" src="navtreedata.js"></script>
- <script type="text/javascript" src="navtree.js"></script>
- <script type="text/javascript">
- $(document).ready(initResizable);
- $(window).load(resizeHeight);
- </script>
- <link href="doxygen.css" rel="stylesheet" type="text/css" />
- </head>
- <body>
- <div id="top"><!-- do not remove this div, it is closed by doxygen! -->
- <div id="titlearea">
- <table cellspacing="0" cellpadding="0">
- <tbody>
- <tr style="height: 56px;">
- <td id="projectlogo"><img alt="Logo" src="libwebsockets.org-logo.png"/></td>
- <td id="projectalign" style="padding-left: 0.5em;">
- <div id="projectname">libwebsockets
- </div>
- <div id="projectbrief">Lightweight C library for HTML5 websockets</div>
- </td>
- </tr>
- </tbody>
- </table>
- </div>
- <!-- end header part -->
- <!-- Generated by Doxygen 1.8.11 -->
- <div id="navrow1" class="tabs">
- <ul class="tablist">
- <li><a href="index.html"><span>Main Page</span></a></li>
- <li><a href="pages.html"><span>Related Pages</span></a></li>
- <li class="current"><a href="modules.html"><span>Modules</span></a></li>
- <li><a href="annotated.html"><span>Data Structures</span></a></li>
- <li><a href="files.html"><span>Files</span></a></li>
- </ul>
- </div>
- </div><!-- top -->
- <div id="side-nav" class="ui-resizable side-nav-resizable">
- <div id="nav-tree">
- <div id="nav-tree-contents">
- <div id="nav-sync" class="sync"></div>
- </div>
- </div>
- <div id="splitbar" style="-moz-user-select:none;"
- class="ui-resizable-handle">
- </div>
- </div>
- <script type="text/javascript">
- $(document).ready(function(){initNavTree('group__extensions.html','');});
- </script>
- <div id="doc-content">
- <div class="header">
- <div class="summary">
- <a href="#nested-classes">Data Structures</a> |
- <a href="#typedef-members">Typedefs</a> |
- <a href="#enum-members">Enumerations</a> |
- <a href="#func-members">Functions</a> </div>
- <div class="headertitle">
- <div class="title">Extensions</div> </div>
- </div><!--header-->
- <div class="contents">
- <table class="memberdecls">
- <tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="nested-classes"></a>
- Data Structures</h2></td></tr>
- <tr class="memitem:"><td class="memItemLeft" align="right" valign="top">struct  </td><td class="memItemRight" valign="bottom"><a class="el" href="structlws__ext__options.html">lws_ext_options</a></td></tr>
- <tr class="separator:"><td class="memSeparator" colspan="2"> </td></tr>
- <tr class="memitem:"><td class="memItemLeft" align="right" valign="top">struct  </td><td class="memItemRight" valign="bottom"><a class="el" href="structlws__ext__option__arg.html">lws_ext_option_arg</a></td></tr>
- <tr class="separator:"><td class="memSeparator" colspan="2"> </td></tr>
- <tr class="memitem:"><td class="memItemLeft" align="right" valign="top">struct  </td><td class="memItemRight" valign="bottom"><a class="el" href="structlws__extension.html">lws_extension</a></td></tr>
- <tr class="separator:"><td class="memSeparator" colspan="2"> </td></tr>
- </table><table class="memberdecls">
- <tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="typedef-members"></a>
- Typedefs</h2></td></tr>
- <tr class="memitem:gaae7169b2cd346b34fa33d0250db2afd0"><td class="memItemLeft" align="right" valign="top">typedef int </td><td class="memItemRight" valign="bottom"><a class="el" href="group__extensions.html#gaae7169b2cd346b34fa33d0250db2afd0">lws_extension_callback_function</a>(struct lws_context *context, const struct <a class="el" href="structlws__extension.html">lws_extension</a> *ext, struct lws *wsi, enum lws_extension_callback_reasons reason, void *user, void *in, size_t len)</td></tr>
- <tr class="separator:gaae7169b2cd346b34fa33d0250db2afd0"><td class="memSeparator" colspan="2"> </td></tr>
- </table><table class="memberdecls">
- <tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="enum-members"></a>
- Enumerations</h2></td></tr>
- <tr class="memitem:gae9993815eee72c6070300a0ae2f022d7"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="gae9993815eee72c6070300a0ae2f022d7"></a>enum  </td><td class="memItemRight" valign="bottom"><b>lws_extension_callback_reasons</b> { <br />
-   <b>LWS_EXT_CB_SERVER_CONTEXT_CONSTRUCT</b> = 0,
- <b>LWS_EXT_CB_CLIENT_CONTEXT_CONSTRUCT</b> = 1,
- <b>LWS_EXT_CB_SERVER_CONTEXT_DESTRUCT</b> = 2,
- <b>LWS_EXT_CB_CLIENT_CONTEXT_DESTRUCT</b> = 3,
- <br />
-   <b>LWS_EXT_CB_CONSTRUCT</b> = 4,
- <b>LWS_EXT_CB_CLIENT_CONSTRUCT</b> = 5,
- <b>LWS_EXT_CB_CHECK_OK_TO_REALLY_CLOSE</b> = 6,
- <b>LWS_EXT_CB_CHECK_OK_TO_PROPOSE_EXTENSION</b> = 7,
- <br />
-   <b>LWS_EXT_CB_DESTROY</b> = 8,
- <b>LWS_EXT_CB_DESTROY_ANY_WSI_CLOSING</b> = 9,
- <b>LWS_EXT_CB_ANY_WSI_ESTABLISHED</b> = 10,
- <b>LWS_EXT_CB_PACKET_RX_PREPARSE</b> = 11,
- <br />
-   <b>LWS_EXT_CB_PACKET_TX_PRESEND</b> = 12,
- <b>LWS_EXT_CB_PACKET_TX_DO_SEND</b> = 13,
- <b>LWS_EXT_CB_HANDSHAKE_REPLY_TX</b> = 14,
- <b>LWS_EXT_CB_FLUSH_PENDING_TX</b> = 15,
- <br />
-   <b>LWS_EXT_CB_EXTENDED_PAYLOAD_RX</b> = 16,
- <b>LWS_EXT_CB_CAN_PROXY_CLIENT_CONNECTION</b> = 17,
- <b>LWS_EXT_CB_1HZ</b> = 18,
- <b>LWS_EXT_CB_REQUEST_ON_WRITEABLE</b> = 19,
- <br />
-   <b>LWS_EXT_CB_IS_WRITEABLE</b> = 20,
- <b>LWS_EXT_CB_PAYLOAD_TX</b> = 21,
- <b>LWS_EXT_CB_PAYLOAD_RX</b> = 22,
- <b>LWS_EXT_CB_OPTION_DEFAULT</b> = 23,
- <br />
-   <b>LWS_EXT_CB_OPTION_SET</b> = 24,
- <b>LWS_EXT_CB_OPTION_CONFIRM</b> = 25,
- <b>LWS_EXT_CB_NAMED_OPTION_SET</b> = 26
- <br />
- }</td></tr>
- <tr class="separator:gae9993815eee72c6070300a0ae2f022d7"><td class="memSeparator" colspan="2"> </td></tr>
- <tr class="memitem:gacc9f55936dc165257a2e1f7d47bce89e"><td class="memItemLeft" align="right" valign="top">enum  </td><td class="memItemRight" valign="bottom"><a class="el" href="group__extensions.html#gacc9f55936dc165257a2e1f7d47bce89e">lws_ext_options_types</a> { <a class="el" href="group__extensions.html#ggacc9f55936dc165257a2e1f7d47bce89eaabcf56c456c1ff6e81dc82586a16f14c">EXTARG_NONE</a>,
- <a class="el" href="group__extensions.html#ggacc9f55936dc165257a2e1f7d47bce89ea1c86adf924c8786a12bee9687094673e">EXTARG_DEC</a>,
- <a class="el" href="group__extensions.html#ggacc9f55936dc165257a2e1f7d47bce89ea5265abe3e1c3f64412f2affe7bffd880">EXTARG_OPT_DEC</a>
- }</td></tr>
- <tr class="separator:gacc9f55936dc165257a2e1f7d47bce89e"><td class="memSeparator" colspan="2"> </td></tr>
- </table><table class="memberdecls">
- <tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="func-members"></a>
- Functions</h2></td></tr>
- <tr class="memitem:gae0e24e1768f83a7fb07896ce975704b9"><td class="memItemLeft" align="right" valign="top">LWS_VISIBLE LWS_EXTERN int </td><td class="memItemRight" valign="bottom"><a class="el" href="group__extensions.html#gae0e24e1768f83a7fb07896ce975704b9">lws_set_extension_option</a> (struct lws *wsi, const char *ext_name, const char *opt_name, const char *opt_val)</td></tr>
- <tr class="separator:gae0e24e1768f83a7fb07896ce975704b9"><td class="memSeparator" colspan="2"> </td></tr>
- <tr class="memitem:ga6fb3e2c3dfb9d64dc87026a4e99c128b"><td class="memItemLeft" align="right" valign="top">LWS_VISIBLE LWS_EXTERN int LWS_WARN_UNUSED_RESULT </td><td class="memItemRight" valign="bottom"><a class="el" href="group__extensions.html#ga6fb3e2c3dfb9d64dc87026a4e99c128b">lws_ext_parse_options</a> (const struct <a class="el" href="structlws__extension.html">lws_extension</a> *ext, struct lws *wsi, void *ext_user, const struct <a class="el" href="structlws__ext__options.html">lws_ext_options</a> *opts, const char *o, int len)</td></tr>
- <tr class="separator:ga6fb3e2c3dfb9d64dc87026a4e99c128b"><td class="memSeparator" colspan="2"> </td></tr>
- <tr class="memitem:ga4cdbe42d872e21a448a947714d6c607e"><td class="memItemLeft" align="right" valign="top">LWS_EXTERN int </td><td class="memItemRight" valign="bottom"><a class="el" href="group__extensions.html#ga4cdbe42d872e21a448a947714d6c607e">lws_extension_callback_pm_deflate</a> (struct lws_context *context, const struct <a class="el" href="structlws__extension.html">lws_extension</a> *ext, struct lws *wsi, enum lws_extension_callback_reasons reason, void *user, void *in, size_t len)</td></tr>
- <tr class="separator:ga4cdbe42d872e21a448a947714d6c607e"><td class="memSeparator" colspan="2"> </td></tr>
- </table>
- <a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
- <h2>Extension releated functions</h2>
- <p>Ws defines optional extensions, lws provides the ability to implement these in user code if so desired.</p>
- <p>We provide one extensions permessage-deflate. </p>
- <h2 class="groupheader">Typedef Documentation</h2>
- <a class="anchor" id="gaae7169b2cd346b34fa33d0250db2afd0"></a>
- <div class="memitem">
- <div class="memproto">
- <table class="memname">
- <tr>
- <td class="memname">typedef int lws_extension_callback_function(struct lws_context *context, const struct <a class="el" href="structlws__extension.html">lws_extension</a> *ext, struct lws *wsi, enum lws_extension_callback_reasons reason, void *user, void *in, size_t len)</td>
- </tr>
- </table>
- </div><div class="memdoc">
- <p><code>#include <<a class="el" href="libwebsockets_8h.html">lib/libwebsockets.h</a>></code></p>
- <p>typedef <a class="el" href="group__extensions.html#gaae7169b2cd346b34fa33d0250db2afd0">lws_extension_callback_function()</a> - Hooks to allow extensions to operate </p><dl class="params"><dt>Parameters</dt><dd>
- <table class="params">
- <tr><td class="paramname">context</td><td>Websockets context </td></tr>
- <tr><td class="paramname">ext</td><td>This extension </td></tr>
- <tr><td class="paramname">wsi</td><td>Opaque websocket instance pointer </td></tr>
- <tr><td class="paramname">reason</td><td>The reason for the call </td></tr>
- <tr><td class="paramname">user</td><td>Pointer to ptr to per-session user data allocated by library </td></tr>
- <tr><td class="paramname">in</td><td>Pointer used for some callback reasons </td></tr>
- <tr><td class="paramname">len</td><td>Length set for some callback reasons <pre class="fragment"> Each extension that is active on a particular connection receives
- callbacks during the connection lifetime to allow the extension to
- operate on websocket data and manage itself.
- Libwebsockets takes care of allocating and freeing "user" memory for
- each active extension on each connection. That is what is pointed to
- by the user parameter.
- LWS_EXT_CB_CONSTRUCT: called when the server has decided to
- select this extension from the list provided by the client,
- just before the server will send back the handshake accepting
- the connection with this extension active. This gives the
- extension a chance to initialize its connection context found
- in user.
- LWS_EXT_CB_CLIENT_CONSTRUCT: same as LWS_EXT_CB_CONSTRUCT
- but called when client is instantiating this extension. Some
- extensions will work the same on client and server side and then
- you can just merge handlers for both CONSTRUCTS.
- LWS_EXT_CB_DESTROY: called when the connection the extension was
- being used on is about to be closed and deallocated. It's the
- last chance for the extension to deallocate anything it has
- allocated in the user data (pointed to by user) before the
- user data is deleted. This same callback is used whether you
- are in client or server instantiation context.
- LWS_EXT_CB_PACKET_RX_PREPARSE: when this extension was active on
- a connection, and a packet of data arrived at the connection,
- it is passed to this callback to give the extension a chance to
- change the data, eg, decompress it. user is pointing to the
- extension's private connection context data, in is pointing
- to an lws_tokens struct, it consists of a char * pointer called
- token, and an int called token_len. At entry, these are
- set to point to the received buffer and set to the content
- length. If the extension will grow the content, it should use
- a new buffer allocated in its private user context data and
- set the pointed-to lws_tokens members to point to its buffer.
- LWS_EXT_CB_PACKET_TX_PRESEND: this works the same way as
- LWS_EXT_CB_PACKET_RX_PREPARSE above, except it gives the
- extension a chance to change websocket data just before it will
- be sent out. Using the same lws_token pointer scheme in in,
- the extension can change the buffer and the length to be
- transmitted how it likes. Again if it wants to grow the
- buffer safely, it should copy the data into its own buffer and
- set the lws_tokens token pointer to it.
- LWS_EXT_CB_ARGS_VALIDATE:</pre> </td></tr>
- </table>
- </dd>
- </dl>
- </div>
- </div>
- <h2 class="groupheader">Enumeration Type Documentation</h2>
- <a class="anchor" id="gacc9f55936dc165257a2e1f7d47bce89e"></a>
- <div class="memitem">
- <div class="memproto">
- <table class="memname">
- <tr>
- <td class="memname">enum <a class="el" href="group__extensions.html#gacc9f55936dc165257a2e1f7d47bce89e">lws_ext_options_types</a></td>
- </tr>
- </table>
- </div><div class="memdoc">
- <p><code>#include <<a class="el" href="libwebsockets_8h.html">lib/libwebsockets.h</a>></code></p>
- <p>enum lws_ext_options_types </p>
- <table class="fieldtable">
- <tr><th colspan="2">Enumerator</th></tr><tr><td class="fieldname"><a class="anchor" id="ggacc9f55936dc165257a2e1f7d47bce89eaabcf56c456c1ff6e81dc82586a16f14c"></a>EXTARG_NONE </td><td class="fielddoc">
- <p>does not take an argument </p>
- </td></tr>
- <tr><td class="fieldname"><a class="anchor" id="ggacc9f55936dc165257a2e1f7d47bce89ea1c86adf924c8786a12bee9687094673e"></a>EXTARG_DEC </td><td class="fielddoc">
- <p>requires a decimal argument </p>
- </td></tr>
- <tr><td class="fieldname"><a class="anchor" id="ggacc9f55936dc165257a2e1f7d47bce89ea5265abe3e1c3f64412f2affe7bffd880"></a>EXTARG_OPT_DEC </td><td class="fielddoc">
- <p>may have an optional decimal argument </p>
- </td></tr>
- </table>
- <div class="fragment"><div class="line"><a name="l01095"></a><span class="lineno"> 1095</span>  {</div><div class="line"><a name="l01096"></a><span class="lineno"> 1096</span>  <a class="code" href="group__extensions.html#ggacc9f55936dc165257a2e1f7d47bce89eaabcf56c456c1ff6e81dc82586a16f14c">EXTARG_NONE</a>, </div><div class="line"><a name="l01097"></a><span class="lineno"> 1097</span>  <a class="code" href="group__extensions.html#ggacc9f55936dc165257a2e1f7d47bce89ea1c86adf924c8786a12bee9687094673e">EXTARG_DEC</a>, </div><div class="line"><a name="l01098"></a><span class="lineno"> 1098</span>  <a class="code" href="group__extensions.html#ggacc9f55936dc165257a2e1f7d47bce89ea5265abe3e1c3f64412f2affe7bffd880">EXTARG_OPT_DEC</a> </div><div class="line"><a name="l01100"></a><span class="lineno"> 1100</span>  <span class="comment">/* Add new things just above here ---^</span></div><div class="line"><a name="l01101"></a><span class="lineno"> 1101</span> <span class="comment"> * This is part of the ABI, don't needlessly break compatibility */</span></div><div class="line"><a name="l01102"></a><span class="lineno"> 1102</span> };</div><div class="ttc" id="group__extensions_html_ggacc9f55936dc165257a2e1f7d47bce89ea5265abe3e1c3f64412f2affe7bffd880"><div class="ttname"><a href="group__extensions.html#ggacc9f55936dc165257a2e1f7d47bce89ea5265abe3e1c3f64412f2affe7bffd880">EXTARG_OPT_DEC</a></div><div class="ttdef"><b>Definition:</b> libwebsockets.h:1098</div></div>
- <div class="ttc" id="group__extensions_html_ggacc9f55936dc165257a2e1f7d47bce89eaabcf56c456c1ff6e81dc82586a16f14c"><div class="ttname"><a href="group__extensions.html#ggacc9f55936dc165257a2e1f7d47bce89eaabcf56c456c1ff6e81dc82586a16f14c">EXTARG_NONE</a></div><div class="ttdef"><b>Definition:</b> libwebsockets.h:1096</div></div>
- <div class="ttc" id="group__extensions_html_ggacc9f55936dc165257a2e1f7d47bce89ea1c86adf924c8786a12bee9687094673e"><div class="ttname"><a href="group__extensions.html#ggacc9f55936dc165257a2e1f7d47bce89ea1c86adf924c8786a12bee9687094673e">EXTARG_DEC</a></div><div class="ttdef"><b>Definition:</b> libwebsockets.h:1097</div></div>
- </div><!-- fragment -->
- </div>
- </div>
- <h2 class="groupheader">Function Documentation</h2>
- <a class="anchor" id="ga6fb3e2c3dfb9d64dc87026a4e99c128b"></a>
- <div class="memitem">
- <div class="memproto">
- <table class="memname">
- <tr>
- <td class="memname">LWS_VISIBLE LWS_EXTERN int LWS_WARN_UNUSED_RESULT lws_ext_parse_options </td>
- <td>(</td>
- <td class="paramtype">const struct <a class="el" href="structlws__extension.html">lws_extension</a> * </td>
- <td class="paramname"><em>ext</em>, </td>
- </tr>
- <tr>
- <td class="paramkey"></td>
- <td></td>
- <td class="paramtype">struct lws * </td>
- <td class="paramname"><em>wsi</em>, </td>
- </tr>
- <tr>
- <td class="paramkey"></td>
- <td></td>
- <td class="paramtype">void * </td>
- <td class="paramname"><em>ext_user</em>, </td>
- </tr>
- <tr>
- <td class="paramkey"></td>
- <td></td>
- <td class="paramtype">const struct <a class="el" href="structlws__ext__options.html">lws_ext_options</a> * </td>
- <td class="paramname"><em>opts</em>, </td>
- </tr>
- <tr>
- <td class="paramkey"></td>
- <td></td>
- <td class="paramtype">const char * </td>
- <td class="paramname"><em>o</em>, </td>
- </tr>
- <tr>
- <td class="paramkey"></td>
- <td></td>
- <td class="paramtype">int </td>
- <td class="paramname"><em>len</em> </td>
- </tr>
- <tr>
- <td></td>
- <td>)</td>
- <td></td><td></td>
- </tr>
- </table>
- </div><div class="memdoc">
- <p><code>#include <<a class="el" href="libwebsockets_8h.html">lib/libwebsockets.h</a>></code></p>
- <p><a class="el" href="group__extensions.html#ga6fb3e2c3dfb9d64dc87026a4e99c128b">lws_ext_parse_options()</a> - deal with parsing negotiated extension options</p>
- <dl class="params"><dt>Parameters</dt><dd>
- <table class="params">
- <tr><td class="paramname">ext</td><td>related extension struct </td></tr>
- <tr><td class="paramname">wsi</td><td>websocket connection </td></tr>
- <tr><td class="paramname">ext_user</td><td>per-connection extension private data </td></tr>
- <tr><td class="paramname">opts</td><td>list of supported options </td></tr>
- <tr><td class="paramname">o</td><td>option string to parse </td></tr>
- <tr><td class="paramname">len</td><td>length </td></tr>
- </table>
- </dd>
- </dl>
- </div>
- </div>
- <a class="anchor" id="ga4cdbe42d872e21a448a947714d6c607e"></a>
- <div class="memitem">
- <div class="memproto">
- <table class="memname">
- <tr>
- <td class="memname">LWS_EXTERN int lws_extension_callback_pm_deflate </td>
- <td>(</td>
- <td class="paramtype">struct lws_context * </td>
- <td class="paramname"><em>context</em>, </td>
- </tr>
- <tr>
- <td class="paramkey"></td>
- <td></td>
- <td class="paramtype">const struct <a class="el" href="structlws__extension.html">lws_extension</a> * </td>
- <td class="paramname"><em>ext</em>, </td>
- </tr>
- <tr>
- <td class="paramkey"></td>
- <td></td>
- <td class="paramtype">struct lws * </td>
- <td class="paramname"><em>wsi</em>, </td>
- </tr>
- <tr>
- <td class="paramkey"></td>
- <td></td>
- <td class="paramtype">enum lws_extension_callback_reasons </td>
- <td class="paramname"><em>reason</em>, </td>
- </tr>
- <tr>
- <td class="paramkey"></td>
- <td></td>
- <td class="paramtype">void * </td>
- <td class="paramname"><em>user</em>, </td>
- </tr>
- <tr>
- <td class="paramkey"></td>
- <td></td>
- <td class="paramtype">void * </td>
- <td class="paramname"><em>in</em>, </td>
- </tr>
- <tr>
- <td class="paramkey"></td>
- <td></td>
- <td class="paramtype">size_t </td>
- <td class="paramname"><em>len</em> </td>
- </tr>
- <tr>
- <td></td>
- <td>)</td>
- <td></td><td></td>
- </tr>
- </table>
- </div><div class="memdoc">
- <p><code>#include <<a class="el" href="libwebsockets_8h.html">lib/libwebsockets.h</a>></code></p>
- <p><a class="el" href="group__extensions.html#ga4cdbe42d872e21a448a947714d6c607e">lws_extension_callback_pm_deflate()</a> - extension for RFC7692</p>
- <dl class="params"><dt>Parameters</dt><dd>
- <table class="params">
- <tr><td class="paramname">context</td><td>lws context </td></tr>
- <tr><td class="paramname">ext</td><td>related <a class="el" href="structlws__extension.html">lws_extension</a> struct </td></tr>
- <tr><td class="paramname">wsi</td><td>websocket connection </td></tr>
- <tr><td class="paramname">reason</td><td>incoming callback reason </td></tr>
- <tr><td class="paramname">user</td><td>per-connection extension private data </td></tr>
- <tr><td class="paramname">in</td><td>pointer parameter </td></tr>
- <tr><td class="paramname">len</td><td>length parameter</td></tr>
- </table>
- </dd>
- </dl>
- <p>Built-in callback implementing RFC7692 permessage-deflate </p>
- </div>
- </div>
- <a class="anchor" id="gae0e24e1768f83a7fb07896ce975704b9"></a>
- <div class="memitem">
- <div class="memproto">
- <table class="memname">
- <tr>
- <td class="memname">LWS_VISIBLE LWS_EXTERN int lws_set_extension_option </td>
- <td>(</td>
- <td class="paramtype">struct lws * </td>
- <td class="paramname"><em>wsi</em>, </td>
- </tr>
- <tr>
- <td class="paramkey"></td>
- <td></td>
- <td class="paramtype">const char * </td>
- <td class="paramname"><em>ext_name</em>, </td>
- </tr>
- <tr>
- <td class="paramkey"></td>
- <td></td>
- <td class="paramtype">const char * </td>
- <td class="paramname"><em>opt_name</em>, </td>
- </tr>
- <tr>
- <td class="paramkey"></td>
- <td></td>
- <td class="paramtype">const char * </td>
- <td class="paramname"><em>opt_val</em> </td>
- </tr>
- <tr>
- <td></td>
- <td>)</td>
- <td></td><td></td>
- </tr>
- </table>
- </div><div class="memdoc">
- <p><code>#include <<a class="el" href="libwebsockets_8h.html">lib/libwebsockets.h</a>></code></p>
- <p><a class="el" href="group__extensions.html#gae0e24e1768f83a7fb07896ce975704b9">lws_set_extension_option()</a>: set extension option if possible</p>
- <dl class="params"><dt>Parameters</dt><dd>
- <table class="params">
- <tr><td class="paramname">wsi</td><td>websocket connection </td></tr>
- <tr><td class="paramname">ext_name</td><td>name of ext, like "permessage-deflate" </td></tr>
- <tr><td class="paramname">opt_name</td><td>name of option, like "rx_buf_size" </td></tr>
- <tr><td class="paramname">opt_val</td><td>value to set option to </td></tr>
- </table>
- </dd>
- </dl>
- </div>
- </div>
- </div><!-- contents -->
- </div><!-- doc-content -->
- <!-- start footer part -->
- <div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
- <ul>
- <li class="footer">Generated by
- <a href="http://www.doxygen.org/index.html">
- <img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.8.11 </li>
- </ul>
- </div>
- </body>
- </html>
|