diff options
author | Andy Green <andy@warmcat.com> | 2011-03-05 16:12:15 +0000 |
---|---|---|
committer | Andy Green <andy@warmcat.com> | 2011-03-05 16:12:15 +0000 |
commit | d6e09110bbb97d35c7523905799e425d92c88527 (patch) | |
tree | 06ab776e068a0bff0408ce4251aa23beb5d6e027 /libwebsockets-api-doc.html | |
parent | 2e24da08c4b8d76d248008541eeb33471c993068 (diff) |
introduce struct libwebsocket_extension
Signed-off-by: Andy Green <andy@warmcat.com>
Diffstat (limited to 'libwebsockets-api-doc.html')
-rw-r--r-- | libwebsockets-api-doc.html | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/libwebsockets-api-doc.html b/libwebsockets-api-doc.html index 70bf4f2..239f393 100644 --- a/libwebsockets-api-doc.html +++ b/libwebsockets-api-doc.html @@ -221,6 +221,7 @@ has been created. (<i>int</i> <b>port</b>, <i>const char *</i> <b>interf</b>, <i>struct libwebsocket_protocols *</i> <b>protocols</b>, +<i>struct libwebsocket_extension *</i> <b>extensions</b>, <i>const char *</i> <b>ssl_cert_filepath</b>, <i>const char *</i> <b>ssl_private_key_filepath</b>, <i>int</i> <b>gid</b>, @@ -740,3 +741,21 @@ array of these structures is passed to <b>libwebsocket_create_server</b> allows as many protocols as you like to be handled by one server. </blockquote> <hr> +<h2>struct libwebsocket_extension - An extension we know how to cope with</h2> +<b>struct libwebsocket_extension</b> {<br> + <i>const char *</i> <b>name</b>;<br> + <i>int (*</i><b>callback</b>) <i>(struct libwebsocket_context *context,struct libwebsocket *wsi,enum libwebsocket_callback_reasons reason, void *user,void *in, size_t len)</i>;<br> + <i>size_t</i> <b>per_session_data_size</b>;<br> +};<br> +<h3>Members</h3> +<dl> +<dt><b>name</b> +<dd>Formal extension name, eg, "deflate-stream" +<dt><b>callback</b> +<dd>Service callback +<dt><b>per_session_data_size</b> +<dd>Libwebsockets will auto-malloc this much +memory for the use of the extension, a pointer +to it comes in the <tt><b>user</b></tt> callback parameter +</dl> +<hr> |