doxygen use sections
authorAndy Green <andy@warmcat.com>
Wed, 13 Jul 2016 00:14:57 +0000 (08:14 +0800)
committerAndy Green <andy@warmcat.com>
Thu, 14 Jul 2016 00:57:28 +0000 (08:57 +0800)
22 files changed:
README.build.md
README.coding.md
README.generic-sessions.md
README.lwsws.md
README.test-apps.md
doc/html/md_README.build.html
doc/html/md_README.coding.html
doc/html/md_README.generic-sessions.html
doc/html/md_README.generic-table.html [new file with mode: 0644]
doc/html/md_README.lwsws.html
doc/html/md_README.test-apps.html
doc/html/navtreedata.js
doc/html/navtreeindex0.js
doc/html/navtreeindex1.js
doc/html/navtreeindex2.js
doc/html/navtreeindex3.js
doc/html/navtreeindex4.js [new file with mode: 0644]
doc/latex/md_README.build.tex
doc/latex/md_README.coding.tex
doc/latex/md_README.generic-sessions.tex
doc/latex/md_README.lwsws.tex
doc/latex/md_README.test-apps.tex

index 4055ecf..18dea7a 100644 (file)
@@ -2,8 +2,7 @@ Notes about building lws
 ========================
 
 
-Introduction to CMake
----------------------
+@section cm Introduction to CMake
 
 CMake is a multi-platform build tool that can generate build files for many
 different target platforms. See more info at http://www.cmake.org
@@ -22,8 +21,8 @@ with SSL support (both OpenSSL/wolfSSL):
 - OSX
 - NetBSD
 
-Building the library and test apps
-----------------------------------
+
+@section build1 Building the library and test apps
 
 The project settings used by CMake to generate the platform specific build
 files is called [CMakeLists.txt](CMakeLists.txt). CMake then uses one of its "Generators" to
@@ -33,8 +32,8 @@ the available generators for your platform, simply run the "cmake" command.
 Note that by default OpenSSL will be linked, if you don't want SSL support
 see below on how to toggle compile options.
 
-Building on Unix:
------------------
+
+@section bu Building on Unix:
 
 1. Install CMake 2.8 or greater: http://cmake.org/cmake/resources/software.html
    (Most Unix distributions comes with a packaged version also)
@@ -101,15 +100,15 @@ compiled in, use
        $ cmake .. -DCMAKE_BUILD_TYPE=DEBUG
 ```
 
-Quirk of cmake
---------------
+@section cmq Quirk of cmake
 
 When changing cmake options, for some reason the only way to get it to see the
 changes sometimes is delete the contents of your build directory and do the
 cmake from scratch.
 
-Building on Windows (Visual Studio)
------------------------------------
+
+@section cmw Building on Windows (Visual Studio)
+
 1. Install CMake 2.6 or greater: http://cmake.org/cmake/resources/software.html
 
 2. Install OpenSSL binaries. http://www.openssl.org/related/binaries.html
@@ -147,8 +146,8 @@ Building on Windows (Visual Studio)
 6. If you're using libuv, you must make sure to compile libuv with the same multithread-dll / Mtd attributes as libwebsockets itself
 
 
-Building on Windows (MinGW)
----------------------------
+@section cmwmgw Building on Windows (MinGW)
+
 1. Install MinGW: http://sourceforge.net/projects/mingw/files
 
    (**NOTE**: Preferably in the default location C:\MinGW)
@@ -210,26 +209,8 @@ Building on Windows (MinGW)
        $ make install
 ```
 
-Setting compile options
------------------------
-
-To set compile time flags you can either use one of the CMake gui applications
-or do it via command line.
-
-Command line
-------------
-To list avaialable options (ommit the H if you don't want the help text):
-
-       cmake -LH ..
+@section mbed3 Building on mbed3
 
-Then to set an option and build (for example turn off SSL support):
-
-       cmake -DLWS_WITH_SSL=0 ..
-or
-       cmake -DLWS_WITH_SSL:BOOL=OFF ..
-
-Building on mbed3
------------------
 MBED3 is a non-posix embedded OS targeted on Cortex M class chips.
 
 https://www.mbed.com/
@@ -270,21 +251,39 @@ and cd into it
 
 8) yotta build
 
+@section cmco Setting compile options
+
+
+To set compile time flags you can either use one of the CMake gui applications
+or do it via command line.
+
+@subsection cmcocl Command line
+
+To list avaialable options (omit the H if you don't want the help text):
+
+       cmake -LH ..
+
+Then to set an option and build (for example turn off SSL support):
+
+       cmake -DLWS_WITH_SSL=0 ..
+or
+       cmake -DLWS_WITH_SSL:BOOL=OFF ..
+
+@subsection cmcoug Unix GUI
 
-Unix GUI
---------
 If you have a curses-enabled build you simply type:
 (not all packages include this, my debian install does not for example).
 
        ccmake
 
-Windows GUI
------------
+@subsection cmcowg Windows GUI
+
 On windows CMake comes with a gui application:
        Start -> Programs -> CMake -> CMake (cmake-gui)
 
-wolfSSL/CyaSSL replacement for OpenSSL
---------------------------------------
+
+@section wolf wolfSSL/CyaSSL replacement for OpenSSL
+
 wolfSSL/CyaSSL is a lightweight SSL library targeted at embedded systems:
 https://www.wolfssl.com/wolfSSL/Products-wolfssl.html
 
@@ -294,8 +293,8 @@ much link to it instead of OpenSSL, giving a much smaller footprint.
 **NOTE**: wolfssl needs to be compiled using the `--enable-opensslextra` flag for
 this to work.
 
-Compiling libwebsockets with wolfSSL
-------------------------------------
+@section wolf1 Compiling libwebsockets with wolfSSL
+
 ```
        cmake .. -DLWS_USE_WOLFSSL=1 \
                 -DLWS_WOLFSSL_INCLUDE_DIRS=/path/to/wolfssl \
@@ -304,8 +303,8 @@ Compiling libwebsockets with wolfSSL
 
 **NOTE**: On windows use the .lib file extension for `LWS_WOLFSSL_LIBRARIES` instead.
 
-Compiling libwebsockets with CyaSSL
------------------------------------
+@section cya Compiling libwebsockets with CyaSSL
+
 ```
        cmake .. -DLWS_USE_CYASSL=1 \
                 -DLWS_CYASSL_INCLUDE_DIRS=/path/to/cyassl \
@@ -314,22 +313,8 @@ Compiling libwebsockets with CyaSSL
 
 **NOTE**: On windows use the .lib file extension for `LWS_CYASSL_LIBRARIES` instead.
 
-Compiling libwebsockets with PolarSSL
--------------------------------------
 
-Caution... at some point PolarSSL became MbedTLS.  But it did not happen all at once.
-The name changed first then at mbedTLS 2.0 the apis changed.  So eg in Fedora 22,
-there is an "mbedtls" package which is actually using polarssl for the include dir
-and polarssl apis... this should be treated as polarssl then.
-
-Example config for this case is
-```
-cmake .. -DLWS_USE_POLARSSL=1 -DLWS_POLARSSL_LIBRARIES=/usr/lib64/libmbedtls.so \
-        -DLWS_POLARSSL_INCLUDE_DIRS=/usr/include/polarssl/
-```
-
-Building plugins outside of lws itself
---------------------------------------
+@section extplugins Building plugins outside of lws itself
 
 The directory ./plugin-standalone/ shows how easy it is to create plugins
 outside of lws itself.  First build lws itself with -DLWS_WITH_PLUGINS,
@@ -361,8 +346,7 @@ additionally, discovered plugins are not enabled automatically for security
 reasons.  You do this using info->pvo or for lwsws, in the JSON config.
 
 
-Reproducing HTTP2.0 tests
--------------------------
+@section http2rp Reproducing HTTP2.0 tests
 
 You must have built and be running lws against a version of openssl that has
 ALPN / NPN.  Most distros still have older versions.  You'll know it's right by
@@ -383,8 +367,8 @@ For SSL / ALPN HTTP2.0 upgrade
        $ nghttp -nvas https://localhost:7681/test.html
 ```
 
-Cross compiling
----------------
+@section cross Cross compiling
+
 To enable cross-compiling **libwebsockets** using CMake you need to create
 a "Toolchain file" that you supply to CMake when generating your build files.
 CMake will then use the cross compilers and build paths specified in this file
@@ -408,8 +392,7 @@ need to provide the cross libraries otherwise.
 Additional information on cross compilation with CMake:
        http://www.vtk.org/Wiki/CMake_Cross_Compiling
 
-Memory efficiency
------------------
+@section mem Memory efficiency
 
 Embedded server-only configuration without extensions (ie, no compression
 on websocket connections), but with full v13 websocket features and http
index 5b43839..7a85e33 100644 (file)
@@ -1,8 +1,7 @@
 Notes about coding with lws
 ===========================
 
-Daemonization
--------------
+@section dae Daemonization
 
 There's a helper api `lws_daemonize` built by default that does everything you
 need to daemonize well, including creating a lock file.  If you're making
@@ -14,8 +13,7 @@ daemon is headless, so you'll need to sort out alternative logging, by, eg,
 syslog.
 
 
-Maximum number of connections
------------------------------
+@section conns Maximum number of connections
 
 The maximum number of connections the library can deal with is decided when
 it starts by querying the OS to find out how many file descriptors it is
@@ -28,8 +26,9 @@ similar to change the avaiable number of file descriptors, and when restarted
 **libwebsockets** will adapt accordingly.
 
 
-Libwebsockets is singlethreaded
--------------------------------
+@section evtloop Libwebsockets is singlethreaded
+
+Libwebsockets works in a serialized event loop, in a single thread.
 
 Directly performing websocket actions from other threads is not allowed.
 Aside from the internal data being inconsistent in `forked()` processes,
@@ -67,8 +66,7 @@ SSL_library_init() is called from the context create api and it also is not
 reentrant.  So at least create the contexts sequentially.
 
 
-Only send data when socket writeable
-------------------------------------
+@section writeable Only send data when socket writeable
 
 You should only send data on a websocket connection from the user callback
 `LWS_CALLBACK_SERVER_WRITEABLE` (or `LWS_CALLBACK_CLIENT_WRITEABLE` for
@@ -90,8 +88,7 @@ in the ...WRITEABLE callback.
 See the test server code for an example of how to do this.
 
 
-Do not rely on only your own WRITEABLE requests appearing
----------------------------------------------------------
+@section otherwr Do not rely on only your own WRITEABLE requests appearing
 
 Libwebsockets may generate additional `LWS_CALLBACK_CLIENT_WRITEABLE` events
 if it met network conditions where it had to buffer your send data internally.
@@ -104,8 +101,7 @@ It's quite possible you get an 'extra' writeable callback at any time and
 just need to `return 0` and wait for the expected callback later.
 
 
-Closing connections from the user side
---------------------------------------
+@section closing Closing connections from the user side
 
 When you want to close a connection, you do it by returning `-1` from a
 callback for that connection.
@@ -122,11 +118,10 @@ take care of closing the connection automatically.
 If you have a silently dead connection, it's possible to enter a state where
 the send pipe on the connection is choked but no ack will ever come, so the
 dead connection will never become writeable.  To cover that, you can use TCP
-keepalives (see later in this document)
+keepalives (see later in this document) or pings.
 
 
-Fragmented messages
--------------------
+@section frags Fragmented messages
 
 To support fragmented messages you need to check for the final
 frame of a message with `lws_is_final_fragment`. This
@@ -158,8 +153,7 @@ The test app libwebsockets-test-fraggle sources also show how to
 deal with fragmented messages.
 
 
-Debug Logging
--------------
+@section debuglog Debug Logging
 
 Also using `lws_set_log_level` api you may provide a custom callback to actually
 emit the log string.  By default, this points to an internal emit function
@@ -180,9 +174,17 @@ The logging apis are made available for user code.
 The difference between notice and info is that notice will be logged by default
 whereas info is ignored by default.
 
+If you are not building with _DEBUG defined, ie, without this
+
+```
+       $ cmake .. -DCMAKE_BUILD_TYPE=DEBUG
+```
+
+then log levels below notice do not actually get compiled in.
 
-External Polling Loop support
------------------------------
+
+
+@section extpoll External Polling Loop support
 
 **libwebsockets** maintains an internal `poll()` array for all of its
 sockets, but you can instead integrate the sockets into an
@@ -215,8 +217,7 @@ reflecting the real event:
    losing windows compatibility
 
 
-Using with in c++ apps
-----------------------
+@section cpp Using with in c++ apps
 
 The library is ready for use by C++ apps.  You can get started quickly by
 copying the test server
@@ -236,18 +237,21 @@ you remove the references to it in your app you don't need to define it on
 the g++ line either.
 
 
-Availability of header information
-----------------------------------
+@section headerinfo Availability of header information
+
+HTTP Header information is managed by a pool of "ah" structs.  These are a
+limited resource so there is pressure to free the headers and return the ah to
+the pool for reuse.
+
+For that reason header information on HTTP connections that get upgraded to
+websockets is lost after the ESTABLISHED callback.  Anything important that
+isn't processed by user code before then should be copied out for later.
 
-From v1.2 of the library onwards, the HTTP header content is `free()`d as soon
-as the websocket connection is established.  For websocket servers, you can
-copy interesting headers by handling `LWS_CALLBACK_FILTER_PROTOCOL_CONNECTION`
-callback, for clients there's a new callback just for this purpose
-`LWS_CALLBACK_CLIENT_FILTER_PRE_ESTABLISH`.
+For HTTP connections that don't upgrade, header info remains available the
+whole time.
 
 
-TCP Keepalive
--------------
+@section ka TCP Keepalive
 
 It is possible for a connection which is not being used to send to die
 silently somewhere between the peer and the side not sending.  In this case
@@ -272,8 +276,8 @@ like Linux does.  On those systems you can enable keepalive by a nonzero
 value in `ka_time`, but the systemwide kernel settings for the time / probes/
 interval are used, regardless of what nonzero value is in `ka_time`.
 
-Optimizing SSL connections
---------------------------
+
+@section sslopt Optimizing SSL connections
 
 There's a member `ssl_cipher_list` in the `lws_context_creation_info` struct
 which allows the user code to restrict the possible cipher selection at
@@ -289,8 +293,7 @@ if left `NULL`, then the "DEFAULT" set of ciphers are all possible to select.
 You can also set it to `"ALL"` to allow everything (including insecure ciphers).
 
 
-Async nature of client connections
-----------------------------------
+@section clientasync Async nature of client connections
 
 When you call `lws_client_connect_info(..)` and get a `wsi` back, it does not
 mean your connection is active.  It just means it started trying to connect.
@@ -308,8 +311,19 @@ loop calling `lws_service()` until one of the above callbacks occurs.
 
 As usual, see [test-client.c](test-server/test-client.c) for example code.
 
-Lws platform-independent file access apis
------------------------------------------
+Notice that the client connection api tries to progress the connection
+somewhat before returning.  That means it's possible to get callbacks like
+CONNECTION_ERROR on the new connection before your user code had a chance to
+get the wsi returned to identify it (in fact if the connection did fail early,
+NULL will be returned instead of the wsi anyway).
+
+To avoid that problem, you can fill in `pwsi` in the client connection info
+struct to point to a struct lws that get filled in early by the client
+connection api with the related wsi.  You can then check for that in the
+callback to confirm the identity of the failing client connection.
+
+
+@section fileapi Lws platform-independent file access apis
 
 lws now exposes his internal platform file abstraction in a way that can be
 both used by user code to make it platform-agnostic, and be overridden or
@@ -352,8 +366,7 @@ file handling apis
 The user code can also override or subclass the file operations, to either
 wrap or replace them.  An example is shown in test server.
 
-ECDH Support
-------------
+@section ecdh ECDH Support
 
 ECDH Certs are now supported.  Enable the CMake option
 
@@ -365,8 +378,7 @@ ECDH Certs are now supported.  Enable the CMake option
 
 to build in support and select it at runtime.
 
-SMP / Multithreaded service
----------------------------
+@section smp SMP / Multithreaded service
 
 SMP support is integrated into LWS without any internal threading.  It's
 very simple to use, libwebsockets-test-server-pthread shows how to do it,
@@ -414,8 +426,7 @@ There is no knowledge or dependency in lws itself about pthreads.  How the
 locking is implemented is entirely up to the user code.
 
 
-Libev / Libuv support
----------------------
+@section libevuv Libev / Libuv support
 
 You can select either or both
 
@@ -431,8 +442,7 @@ context init options flags
 to indicate it will use either of the event libraries.
 
 
-Extension option control from user code
----------------------------------------
+@section extopts Extension option control from user code
 
 User code may set per-connection extension options now, using a new api
 `lws_set_extension_option()`.
@@ -452,8 +462,8 @@ The extension may decide to alter or disallow the change, in the
 example above permessage-deflate restricts the size of his rx
 output buffer also considering the protocol's rx_buf_size member.
 
-Client connections as HTTP[S] rather than WS[S]
------------------------------------------------
+
+@section httpsclient Client connections as HTTP[S] rather than WS[S]
 
 You may open a generic http client connection using the same
 struct lws_client_connect_info used to create client ws[s]
@@ -497,8 +507,14 @@ data, eg
                break;
 ```
 
-Using lws v2 vhosts
--------------------
+Notice that if you will use SSL client connections on a vhost, you must
+prepare the client SSL context for the vhost after creating the vhost, since
+this is not normally done if the vhost was set up to listen / serve.  Call
+the api lws_init_vhost_client_ssl() to also allow client SSL on the vhost.
+
+
+
+@section vhosts Using lws vhosts
 
 If you set LWS_SERVER_OPTION_EXPLICIT_VHOSTS options flag when you create
 your context, it won't create a default vhost using the info struct
@@ -534,8 +550,7 @@ There are some new members but mainly it's stuff you used to set at
 context creation time.
 
 
-How lws matches hostname or SNI to a vhost
-------------------------------------------
+@section sni How lws matches hostname or SNI to a vhost
 
 LWS first strips any trailing :port number.
 
@@ -553,8 +568,7 @@ certificate allows wildcards and error out if not.
  
 
 
-Using lws v2 mounts on a vhost
-------------------------------
+@section mounts Using lws mounts on a vhost
 
 The last argument to lws_create_vhost() lets you associate a linked
 list of lws_http_mount structures with that vhost's URL 'namespace', in
@@ -615,8 +629,7 @@ origin URL.
 associated with the named protocol (which may be a plugin).
 
 
-Operation of LWSMPRO_CALLBACK mounts
-------------------------------------
+@section mountcallback Operation of LWSMPRO_CALLBACK mounts
 
 The feature provided by CALLBACK type mounts is binding a part of the URL
 namespace to a named protocol callback handler.
index 7f2acc1..376342a 100644 (file)
@@ -1,16 +1,14 @@
 Notes about generic-sessions Plugin
 ===================================
 
-Enabling for build
-------------------
+@section gseb Enabling lwsgs for build
 
 Enable at CMake with -DLWS_WITH_GENERIC_SESSIONS=1
 
 This also needs sqlite3 (libsqlite3-dev or similar package)
 
 
-Introduction
-------------
+@section gsi lwsgs Introduction
 
 The generic-sessions protocol plugin provides cookie-based login
 authentication for lws web and ws connections.
@@ -51,8 +49,7 @@ authenticated as.  Everything underneath is managed in generic-sessions.
  - No code (just config) required for, eg, private URL namespace that requires login to access. 
  
 
-Integration to HTML
--------------------
+@section gsin Lwsgs Integration to HTML
 
 Only three steps are needed to integrate lwsgs in your HTML.
 
@@ -92,8 +89,8 @@ That's it.  An example is below
         </body>
        </html>
 ```
-Overall Flow
-------------
+
+@section gsof Lwsgs Overall Flow@
 
 When the protocol is initialized, it gets per-vhost information from the config, such
 as where the sqlite3 databases are to be stored.  The admin username and sha-1 of the
@@ -112,10 +109,9 @@ After a successful login, the sqlite record at the server for the current sessio
 
 
 
-Configuration
--------------
+@section gsconf Lwsgs Configuration
 
-"auth-mask" defines the autorization sector bits that must be enabled on the session to gain access.
+"auth-mask" defines the authorization sector bits that must be enabled on the session to gain access.
 
 "auth-mask" 0 is the default.
 
@@ -227,8 +223,7 @@ Notice the real application uses his own sqlite db, no details about how
 generic-sessions works or how it stores data are available to it.
 
 
-Password Confounder
--------------------
+@section gspwc Lwsgs Password Confounder
 
 You can also define a per-vhost confounder shown in the example above, used
 when aggregating the password with the salt when it is hashed.  Any attacker
@@ -236,8 +231,7 @@ will also need to get the confounder along with the database, which you can
 make harder by making the config dir only eneterable / readable by root.
 
 
-Preparing the db directory
---------------------------
+@section gsprep Lwsgs Preparing the db directory
 
 You will have to prepare the db directory so it's suitable for the lwsws user to use,
 that usually means apache, eg
@@ -248,8 +242,7 @@ that usually means apache, eg
        # chmod 770 /var/www/sessions
 ```
 
-Email configuration
--------------------
+@section gsrmail Lwsgs Email configuration
 
 lwsgs will can send emails by talking to an SMTP server on localhost:25.  That
 will usually be sendmail or postfix, you should confirm that works first by
@@ -258,14 +251,16 @@ itself using the `mail` application to send on it.
 lwsgs has been tested on stock Fedora sendmail and postfix.
 
 
-Integration with another protocol
----------------------------------
+@section gsap Lwsgs Integration with another protocol
 
 lwsgs is designed to provide sessions and accounts in a standalone and generic way.
 
 But it's not useful by itself, there will always be the actual application who wants
 to make use of generic-sessions features.
 
+We provide the "messageboard" plugin as an example of how to integrate with
+your actual application protocol.
+
 The basic approach is the 'real' protocol handler (usually a plugin itself)
 subclasses the generic-sessions plugin and calls through to it by default.
 
@@ -340,8 +335,7 @@ secondary allocations.
 ```
 
 
-Getting session-specific information from another protocol
-----------------------------------------------------------
+#section gsapsib Getting session-specific information from another protocol
 
 At least at the time when someone tries to upgrade an http(s) connection to
 ws(s) with your real protocol, it is necessary to confirm the cookie the http(s)
index a8722b0..d9f6f07 100644 (file)
@@ -1,26 +1,29 @@
 Notes about lwsws
 =================
 
-Libwebsockets Web Server
-------------------------
+@section lwsws Libwebsockets Web Server
 
 lwsws is an implementation of a very lightweight, ws-capable generic web
 server, which uses libwebsockets to implement everything underneath.
 
-Build
------
+If you are basically implementing a standalone server with lws, you can avoid
+reinventing the wheel and use a debugged server including lws.
+
+
+@section lwswsb Build
 
 Just enable -DLWS_WITH_LWSWS=1 at cmake-time.
 
 It enables libuv and plugin support automatically.
 
 
-Configuration
--------------
+@section lwswsc Lwsws Configuration
 
-lwsws uses JSON config files, they're pure JSON but # may be used to turn the rest of the line into a comment.
+lwsws uses JSON config files, they're pure JSON except:
 
-There's also a single substitution, if a string contains "_lws_ddir_", then that is
+ - '#' may be used to turn the rest of the line into a comment.
+
+ - There's also a single substitution, if a string contains "_lws_ddir_", then that is
 replaced with the LWS install data directory path, eg, "/usr/share" or whatever was
 set when LWS was built + installed.  That lets you refer to installed paths without
 having to change the config if your install path was different.
@@ -71,8 +74,8 @@ on port 7681, non-SSL is provided.  To set it up
        # cp ./lwsws/etc-lwsws-conf.d-localhost-EXAMPLE /etc/lwsws/conf.d/test-server
        # sudo lwsws
 ```
-Vhosts
-------
+
+@section lwswsv Lwsws Vhosts
 
 One server can run many vhosts, where SSL is in use SNI is used to match
 the connection to a vhost and its vhost-specific SSL keys during SSL
@@ -132,8 +135,7 @@ Listing multiple vhosts looks something like this
 That sets up three vhosts all called "localhost" on ports 443 and 7681 with SSL, and port 80 without SSL but with a forced redirect to https://localhost
 
 
-Vhost name and port
--------------------
+@section lwswsvn Lwsws Vhost name and port sharing
 
 The vhost name field is used to match on incoming SNI or Host: header, so it
 must always be the host name used to reach the vhost externally.
@@ -147,8 +149,7 @@ negotiation time (via SNI) or if no SSL, then after the Host: header from
 the client has been parsed.
 
 
-Protocols
----------
+@section lwswspr Lwsws Protocols
 
 Vhosts by default have available the union of any initial protocols from context creation time, and
 any protocols exposed by plugins.
@@ -178,8 +179,7 @@ by the client, you can use "default": "1"
 ```
 
 
-Other vhost options
--------------------
+@section lwswsovo Lwsws Other vhost options
 
  - If the three options `host-ssl-cert`, `host-ssl-ca` and `host-ssl-key` are given, then the vhost supports SSL.
 
@@ -223,8 +223,7 @@ Other vhost options
  - "`ssl-option-clear'": "<decimal>"   Clears the SSL option flag value for the vhost.
  It may be used multiple times and OR's the flags together.
 
-Mounts
-------
+@section lwswsm Lwsws Mounts
 
 Where mounts are given in the vhost definition, then directory contents may
 be auto-served if it matches the mountpoint.
@@ -261,8 +260,7 @@ Mount protocols are used to control what kind of translation happens
 
 
 
-Other mount options
--------------------
+@section lwswsomo Lwsws Other mount options
 
 1) Some protocols may want "per-mount options" in name:value format.  You can
 provide them using "pmo"
@@ -329,8 +327,7 @@ options are given, the content is marked uncacheable.
                 }
 ```
 
-Plugins
--------
+@section lwswspl Lwsws Plugins
 
 Protcols and extensions may also be provided from "plugins", these are
 lightweight dynamic libraries.  They are scanned for at init time, and
@@ -357,8 +354,7 @@ To help that happen conveniently, there are some new apis
 dumb increment, mirror and status protocol plugins are provided as examples.
 
 
-Additional plugin search paths
-------------------------------
+@section lwswsplaplp Additional plugin search paths
 
 Packages that have their own lws plugins can install them in their own
 preferred dir and ask lwsws to scan there by using a config fragment
@@ -371,8 +367,7 @@ like this, in its own conf.d/ file managed by the other package
        }
 ```
 
-lws-server-status plugin
-------------------------
+@section lwswsssp lws-server-status plugin
 
 One provided protocol can be used to monitor the server status.
 
@@ -397,8 +392,7 @@ You might choose to put it on its own vhost which has "interface": "lo", so it's
 externally visible.
 
 
-Integration with Systemd
-------------------------
+@section lwswssysd Lwsws Integration with Systemd
 
 lwsws needs a service file like this as `/usr/lib/systemd/system/lwsws.service`
 ```
@@ -417,8 +411,7 @@ lwsws needs a service file like this as `/usr/lib/systemd/system/lwsws.service`
 You can find this prepared in `./lwsws/usr-lib-systemd-system-lwsws.service`
 
 
-Integration with logrotate
---------------------------
+@section lwswslr Lwsws Integration with logrotate
 
 For correct operation with logrotate, `/etc/logrotate.d/lwsws` (if that's
 where we're putting the logs) should contain
index 1437b31..e9a3ae2 100644 (file)
@@ -47,8 +47,7 @@ being done in protocol plugins only.
 Notes about lws test apps
 =========================
 
-Testing server with a browser
------------------------------
+@section tsb Testing server with a browser
 
 If you run [libwebsockets-test-server](test-server/test-server.c) and point your browser
 (eg, Chrome) to
@@ -63,8 +62,7 @@ By default the test server logs to both stderr and syslog, you can control
 what is logged using `-d <log level>`, see later.
 
 
-Running test server as a Daemon
--------------------------------
+@section tsd Running test server as a Daemon
 
 You can use the -D option on the test server to have it fork into the
 background and return immediately.  In this daemonized mode all stderr is
@@ -85,8 +83,7 @@ If the lock is valid, the daemon will exit with a note on stderr that
 it was already running.
 
 
-Using SSL on the server side
-----------------------------
+@section sssl Using SSL on the server side
 
 To test it using SSL/WSS, just run the test server with
 ```
@@ -107,8 +104,7 @@ same.
 serving both the script html over http and websockets.
 
 
-Testing websocket client support
---------------------------------
+@section wscl Testing websocket client support
 
 If you run the test server as described above, you can also
 connect to it using the test client as well as a browser.
@@ -134,8 +130,7 @@ otherwise it will strictly fail the connection if there is no CA cert to
 validate the server's certificate.
 
 
-Choosing between test server variations
----------------------------------------
+@section choosingts Choosing between test server variations
 
 If you will be doing standalone serving with lws, ideally you should avoid
 making your own server at all, and use lwsws with your own protocol plugins.
@@ -149,8 +144,7 @@ that's not possible then the other variations with their own protocol code
 should be considered.
 
 
-Testing simple echo
--------------------
+@section echo Testing simple echo
 
 You can test against `echo.websockets.org` as a sanity test like
 this (the client connects to port `80` by default):
@@ -173,8 +167,7 @@ If you add the `--ssl` switch to both the client and server, you can also test
 with an encrypted link.
 
 
-Testing SSL on the client side
-------------------------------
+@section tassl Testing SSL on the client side
 
 To test SSL/WSS client action, just run the client test with
 ```
@@ -186,8 +179,7 @@ certificates used by the test server, this is indicated by the
 certificate that it doesn't have a trusted CA cert for.
 
 
-Using the websocket ping utility
---------------------------------
+@section taping Using the websocket ping utility
 
 libwebsockets-test-ping connects as a client to a remote
 websocket server and pings it like the
@@ -233,8 +225,7 @@ another server, you can specify the protcol to handshake with
 by `--protocol=protocolname`
 
 
-Fraggle test app
-----------------
+@section ta fraggle Fraggle test app
 
 By default it runs in server mode
 ```
@@ -277,8 +268,7 @@ same checksum using websocket framing to see when the message has ended.  It
 then accepts the server checksum message and compares that to its checksum.
 
 
-proxy support
--------------
+@section taproxy proxy support
 
 The http_proxy environment variable is respected by the client
 connection code for both `ws://` and `wss://`.  It doesn't support
@@ -290,16 +280,18 @@ You use it like this
        $ libwebsockets-test-client someserver.com
 ```
 
-debug logging
--------------
+@section talog debug logging
 
 By default logging of severity "notice", "warn" or "err" is enabled to stderr.
 
 Again by default other logging is compiled in but disabled from printing.
 
-If you want to eliminate the debug logging below notice  in severity, use the
-`--disable-debug` configure option to have it removed from the code by the
-preprocesser.
+By default debug logs below "notice" in severity are not compiled in.  To get
+them included, add this option in CMAKE
+
+```
+       $ cmake .. -DCMAKE_BUILD_TYPE=DEBUG
+```
 
 If you want to see more detailed debug logs, you can control a bitfield to
 select which logs types may print using the `lws_set_log_level()` api, in the
@@ -318,15 +310,13 @@ available are (OR together the numbers to select multiple)
  - 512 LATENCY
 
 
-Websocket version supported
----------------------------
+@section ws13 Websocket version supported
 
 The final IETF standard is supported for both client and server, protocol
 version 13.
 
 
-Latency Tracking
-----------------
+@section latency Latency Tracking
 
 Since libwebsockets runs using `poll()` and a single threaded approach, any
 unexpected latency coming from system calls would be bad news.  There's now
@@ -349,8 +339,7 @@ that time, such as the browser, it may simply indicate the OS gave preferential
 treatment to the other app during that call.
 
 
-Autobahn Test Suite
--------------------
+@section autobahn Autobahn Test Suite
 
 Lws can be tested against the autobahn websocket fuzzer.
 
@@ -377,13 +366,12 @@ file:///projects/libwebsockets/reports/clients/index.html
 to see the results
 
 
-Autobahn Test Notes
--------------------
+@section autobahnnotes Autobahn Test Notes
 
 1) Autobahn tests the user code + lws implementation.  So to get the same
 results, you need to follow test-echo.c in terms of user implmentation.
 
-2) Some of the tests make no sense for Libwebsockets to support and we fail them.
+2) Two of the tests make no sense for Libwebsockets to support and we fail them.
 
  - Tests 2.10 + 2.11: sends multiple pings on one connection.  Lws policy is to
 only allow one active ping in flight on each connection, the rest are dropped.
index b6b92c5..f160b6d 100644 (file)
@@ -65,7 +65,8 @@ $(document).ready(function(){initNavTree('md_README.build.html','');});
 <div class="title">Notes about building lws </div>  </div>
 </div><!--header-->
 <div class="contents">
-<div class="textblock"><h2>Introduction to CMake </h2>
+<div class="textblock"><h1><a class="anchor" id="cm"></a>
+Introduction to CMake</h1>
 <p>CMake is a multi-platform build tool that can generate build files for many different target platforms. See more info at <a href="http://www.cmake.org">http://www.cmake.org</a></p>
 <p>CMake also allows/recommends you to do "out of source"-builds, that is, the build files are separated from your sources, so there is no need to create elaborate clean scripts to get a clean source tree, instead you simply remove your build directory.</p>
 <p>Libwebsockets has been tested to build successfully on the following platforms with SSL support (both OpenSSL/wolfSSL):</p>
@@ -76,19 +77,23 @@ $(document).ready(function(){initNavTree('md_README.build.html','');});
 <li>OSX</li>
 <li>NetBSD</li>
 </ul>
-<h2>Building the library and test apps </h2>
+<h1><a class="anchor" id="build1"></a>
+Building the library and test apps</h1>
 <p>The project settings used by CMake to generate the platform specific build files is called <a href="CMakeLists.txt">CMakeLists.txt</a>. CMake then uses one of its "Generators" to output a Visual Studio project or Make file for instance. To see a list of the available generators for your platform, simply run the "cmake" command.</p>
 <p>Note that by default OpenSSL will be linked, if you don't want SSL support see below on how to toggle compile options.</p>
-<h2>Building on Unix: </h2>
+<h1><a class="anchor" id="bu"></a>
+Building on Unix:</h1>
 <ol type="1">
 <li>Install CMake 2.8 or greater: <a href="http://cmake.org/cmake/resources/software.html">http://cmake.org/cmake/resources/software.html</a> (Most Unix distributions comes with a packaged version also)</li>
 <li>Install OpenSSL.</li>
 <li>Generate the build files (default is Make files): <div class="fragment"><div class="line"><a name="l00001"></a><span class="lineno">    1</span>&#160;$ cd /path/to/src</div><div class="line"><a name="l00002"></a><span class="lineno">    2</span>&#160;$ mkdir build</div><div class="line"><a name="l00003"></a><span class="lineno">    3</span>&#160;$ cd build</div><div class="line"><a name="l00004"></a><span class="lineno">    4</span>&#160;$ cmake ..</div></div><!-- fragment --></li>
 <li>Finally you can build using the generated Makefile: <div class="fragment"><div class="line"><a name="l00001"></a><span class="lineno">    1</span>&#160;$ make &amp;&amp; sudo make install</div></div><!-- fragment --> <b>NOTE</b>: The <code>build/</code><code>directory can have any name and be located anywhere on your filesystem, and that the argument</code>..` given to cmake is simply the source directory of <b>libwebsockets</b> containing the <a href="CMakeLists.txt">CMakeLists.txt</a> project file. All examples in this file assumes you use ".."</li>
 </ol>
-<p><b>NOTE2</b>: A common option you may want to give is to set the install path, same as &ndash;prefix= with autotools. It defaults to /usr/local. You can do this by, eg </p><div class="fragment"><div class="line"><a name="l00001"></a><span class="lineno">    1</span>&#160;$ cmake -DCMAKE_INSTALL_PREFIX:PATH=/usr .</div></div><!-- fragment --><p><b>NOTE3</b>: On machines that want libraries in lib64, you can also add the following to the cmake line </p><div class="fragment"><div class="line"><a name="l00001"></a><span class="lineno">    1</span>&#160;-DLIB_SUFFIX=64</div></div><!-- fragment --><p><b>NOTE4</b>: If you are building against a non-distro OpenSSL (eg, in order to get access to ALPN support only in newer OpenSSL versions) the nice way to express that in one cmake command is eg, </p><div class="fragment"><div class="line"><a name="l00001"></a><span class="lineno">    1</span>&#160;$ cmake .. -DOPENSSL_ROOT_DIR=/usr/local/ssl \</div><div class="line"><a name="l00002"></a><span class="lineno">    2</span>&#160;         -DCMAKE_INCLUDE_DIRECTORIES_PROJECT_BEFORE=/usr/local/ssl \</div><div class="line"><a name="l00003"></a><span class="lineno">    3</span>&#160;         -DLWS_WITH_HTTP2=1</div></div><!-- fragment --><p>When you run the test apps using non-distro SSL, you have to force them to use your libs, not the distro ones </p><div class="fragment"><div class="line"><a name="l00001"></a><span class="lineno">    1</span>&#160;$ LD_LIBRARY_PATH=/usr/local/ssl/lib libwebsockets-test-server --ssl</div></div><!-- fragment --><p>To get it to build on latest openssl (2016-04-10) it needed this approach </p><div class="fragment"><div class="line"><a name="l00001"></a><span class="lineno">    1</span>&#160;cmake .. -DLWS_WITH_HTTP2=1 -DLWS_OPENSSL_INCLUDE_DIRS=/usr/local/include/openssl -DLWS_OPENSSL_LIBRARIES=&quot;/usr/local/lib64/libssl.so;/usr/local/lib64/libcrypto.so&quot;</div></div><!-- fragment --><p><b>NOTE5</b>: To build with debug info and _DEBUG for lower priority debug messages compiled in, use </p><div class="fragment"><div class="line"><a name="l00001"></a><span class="lineno">    1</span>&#160;$ cmake .. -DCMAKE_BUILD_TYPE=DEBUG</div></div><!-- fragment --><h2>Quirk of cmake </h2>
+<p><b>NOTE2</b>: A common option you may want to give is to set the install path, same as &ndash;prefix= with autotools. It defaults to /usr/local. You can do this by, eg </p><div class="fragment"><div class="line"><a name="l00001"></a><span class="lineno">    1</span>&#160;$ cmake -DCMAKE_INSTALL_PREFIX:PATH=/usr .</div></div><!-- fragment --><p><b>NOTE3</b>: On machines that want libraries in lib64, you can also add the following to the cmake line </p><div class="fragment"><div class="line"><a name="l00001"></a><span class="lineno">    1</span>&#160;-DLIB_SUFFIX=64</div></div><!-- fragment --><p><b>NOTE4</b>: If you are building against a non-distro OpenSSL (eg, in order to get access to ALPN support only in newer OpenSSL versions) the nice way to express that in one cmake command is eg, </p><div class="fragment"><div class="line"><a name="l00001"></a><span class="lineno">    1</span>&#160;$ cmake .. -DOPENSSL_ROOT_DIR=/usr/local/ssl \</div><div class="line"><a name="l00002"></a><span class="lineno">    2</span>&#160;         -DCMAKE_INCLUDE_DIRECTORIES_PROJECT_BEFORE=/usr/local/ssl \</div><div class="line"><a name="l00003"></a><span class="lineno">    3</span>&#160;         -DLWS_WITH_HTTP2=1</div></div><!-- fragment --><p>When you run the test apps using non-distro SSL, you have to force them to use your libs, not the distro ones </p><div class="fragment"><div class="line"><a name="l00001"></a><span class="lineno">    1</span>&#160;$ LD_LIBRARY_PATH=/usr/local/ssl/lib libwebsockets-test-server --ssl</div></div><!-- fragment --><p>To get it to build on latest openssl (2016-04-10) it needed this approach </p><div class="fragment"><div class="line"><a name="l00001"></a><span class="lineno">    1</span>&#160;cmake .. -DLWS_WITH_HTTP2=1 -DLWS_OPENSSL_INCLUDE_DIRS=/usr/local/include/openssl -DLWS_OPENSSL_LIBRARIES=&quot;/usr/local/lib64/libssl.so;/usr/local/lib64/libcrypto.so&quot;</div></div><!-- fragment --><p><b>NOTE5</b>: To build with debug info and _DEBUG for lower priority debug messages compiled in, use </p><div class="fragment"><div class="line"><a name="l00001"></a><span class="lineno">    1</span>&#160;$ cmake .. -DCMAKE_BUILD_TYPE=DEBUG</div></div><!-- fragment --><h1><a class="anchor" id="cmq"></a>
+Quirk of cmake</h1>
 <p>When changing cmake options, for some reason the only way to get it to see the changes sometimes is delete the contents of your build directory and do the cmake from scratch.</p>
-<h2>Building on Windows (Visual Studio) </h2>
+<h1><a class="anchor" id="cmw"></a>
+Building on Windows (Visual Studio)</h1>
 <ol type="1">
 <li>Install CMake 2.6 or greater: <a href="http://cmake.org/cmake/resources/software.html">http://cmake.org/cmake/resources/software.html</a></li>
 <li><p class="startli">Install OpenSSL binaries. <a href="http://www.openssl.org/related/binaries.html">http://www.openssl.org/related/binaries.html</a></p>
@@ -109,7 +114,8 @@ $(document).ready(function(){initNavTree('md_README.build.html','');});
 </li>
 <li>If you're using libuv, you must make sure to compile libuv with the same multithread-dll / Mtd attributes as libwebsockets itself</li>
 </ol>
-<h2>Building on Windows (MinGW) </h2>
+<h1><a class="anchor" id="cmwmgw"></a>
+Building on Windows (MinGW)</h1>
 <ol type="1">
 <li><p class="startli">Install MinGW: <a href="http://sourceforge.net/projects/mingw/files">http://sourceforge.net/projects/mingw/files</a></p>
 <p class="startli">(<b>NOTE</b>: Preferably in the default location C:)</p>
@@ -127,13 +133,8 @@ $(document).ready(function(){initNavTree('md_README.build.html','');});
 <p class="startli"><b>NOTE2</b>: To generate build files allowing to create libwebsockets binaries with debug information set the CMAKE_BUILD_TYPE flag to DEBUG: </p><div class="fragment"><div class="line"><a name="l00001"></a><span class="lineno">    1</span>&#160;$ cmake -G &quot;MSYS Makefiles&quot; -DCMAKE_INSTALL_PREFIX=C:/MinGW -DCMAKE_BUILD_TYPE=DEBUG ..</div></div><!-- fragment --></li>
 <li>Finally you can build using the generated Makefile and get the results deployed into your MinGW installation:</li>
 </ol>
-<div class="fragment"><div class="line"><a name="l00001"></a><span class="lineno">    1</span>&#160;$ make</div><div class="line"><a name="l00002"></a><span class="lineno">    2</span>&#160;$ make install</div></div><!-- fragment --><h2>Setting compile options </h2>
-<p>To set compile time flags you can either use one of the CMake gui applications or do it via command line.</p>
-<h2>Command line </h2>
-<p>To list avaialable options (ommit the H if you don't want the help text): </p><pre class="fragment">    cmake -LH ..
-</pre><p>Then to set an option and build (for example turn off SSL support): </p><pre class="fragment">    cmake -DLWS_WITH_SSL=0 ..
-</pre><p> or cmake -DLWS_WITH_SSL:BOOL=OFF ..</p>
-<h2>Building on mbed3 </h2>
+<div class="fragment"><div class="line"><a name="l00001"></a><span class="lineno">    1</span>&#160;$ make</div><div class="line"><a name="l00002"></a><span class="lineno">    2</span>&#160;$ make install</div></div><!-- fragment --><h1><a class="anchor" id="mbed3"></a>
+Building on mbed3</h1>
 <p>MBED3 is a non-posix embedded OS targeted on Cortex M class chips.</p>
 <p><a href="https://www.mbed.com/">https://www.mbed.com/</a></p>
 <p>It's quite unlike any other Posixy platform since the OS is linked statically in with lws to form one binary.</p>
@@ -151,32 +152,47 @@ $(document).ready(function(){initNavTree('md_README.build.html','');});
 <p>6) yotta target frdm-k64f-gcc</p>
 <p>7) yotta install</p>
 <p>8) yotta build</p>
-<h2>Unix GUI </h2>
+<h1><a class="anchor" id="cmco"></a>
+Setting compile options</h1>
+<p>To set compile time flags you can either use one of the CMake gui applications or do it via command line.</p>
+<h2><a class="anchor" id="cmcocl"></a>
+Command line</h2>
+<p>To list avaialable options (omit the H if you don't want the help text): </p><pre class="fragment">    cmake -LH ..
+</pre><p>Then to set an option and build (for example turn off SSL support): </p><pre class="fragment">    cmake -DLWS_WITH_SSL=0 ..
+</pre><p> or cmake -DLWS_WITH_SSL:BOOL=OFF ..</p>
+<h2><a class="anchor" id="cmcoug"></a>
+Unix GUI</h2>
 <p>If you have a curses-enabled build you simply type: (not all packages include this, my debian install does not for example). </p><pre class="fragment">    ccmake
-</pre><h2>Windows GUI </h2>
+</pre><h2><a class="anchor" id="cmcowg"></a>
+Windows GUI</h2>
 <p>On windows CMake comes with a gui application: Start -&gt; Programs -&gt; CMake -&gt; CMake (cmake-gui)</p>
-<h2>wolfSSL/CyaSSL replacement for OpenSSL </h2>
+<h1><a class="anchor" id="wolf"></a>
+wolfSSL/CyaSSL replacement for OpenSSL</h1>
 <p>wolfSSL/CyaSSL is a lightweight SSL library targeted at embedded systems: <a href="https://www.wolfssl.com/wolfSSL/Products-wolfssl.html">https://www.wolfssl.com/wolfSSL/Products-wolfssl.html</a></p>
 <p>It contains a OpenSSL compatibility layer which makes it possible to pretty much link to it instead of OpenSSL, giving a much smaller footprint.</p>
 <p><b>NOTE</b>: wolfssl needs to be compiled using the <code>--enable-opensslextra</code> flag for this to work.</p>
-<h2>Compiling libwebsockets with wolfSSL </h2>
+<h1><a class="anchor" id="wolf1"></a>
+Compiling libwebsockets with wolfSSL</h1>
 <div class="fragment"><div class="line"><a name="l00001"></a><span class="lineno">    1</span>&#160;cmake .. -DLWS_USE_WOLFSSL=1 \</div><div class="line"><a name="l00002"></a><span class="lineno">    2</span>&#160;         -DLWS_WOLFSSL_INCLUDE_DIRS=/path/to/wolfssl \</div><div class="line"><a name="l00003"></a><span class="lineno">    3</span>&#160;         -DLWS_WOLFSSL_LIBRARIES=/path/to/wolfssl/wolfssl.a ..</div></div><!-- fragment --><p><b>NOTE</b>: On windows use the .lib file extension for <code>LWS_WOLFSSL_LIBRARIES</code> instead.</p>
-<h2>Compiling libwebsockets with CyaSSL </h2>
+<h1><a class="anchor" id="cya"></a>
+Compiling libwebsockets with CyaSSL</h1>
 <div class="fragment"><div class="line"><a name="l00001"></a><span class="lineno">    1</span>&#160;cmake .. -DLWS_USE_CYASSL=1 \</div><div class="line"><a name="l00002"></a><span class="lineno">    2</span>&#160;         -DLWS_CYASSL_INCLUDE_DIRS=/path/to/cyassl \</div><div class="line"><a name="l00003"></a><span class="lineno">    3</span>&#160;         -DLWS_CYASSL_LIBRARIES=/path/to/wolfssl/cyassl.a ..</div></div><!-- fragment --><p><b>NOTE</b>: On windows use the .lib file extension for <code>LWS_CYASSL_LIBRARIES</code> instead.</p>
-<h2>Compiling libwebsockets with PolarSSL </h2>
-<p>Caution... at some point PolarSSL became MbedTLS. But it did not happen all at once. The name changed first then at mbedTLS 2.0 the apis changed. So eg in Fedora 22, there is an "mbedtls" package which is actually using polarssl for the include dir and polarssl apis... this should be treated as polarssl then.</p>
-<p>Example config for this case is </p><div class="fragment"><div class="line"><a name="l00001"></a><span class="lineno">    1</span>&#160;cmake .. -DLWS_USE_POLARSSL=1 -DLWS_POLARSSL_LIBRARIES=/usr/lib64/libmbedtls.so \</div><div class="line"><a name="l00002"></a><span class="lineno">    2</span>&#160;         -DLWS_POLARSSL_INCLUDE_DIRS=/usr/include/polarssl/</div></div><!-- fragment --><h2>Building plugins outside of lws itself </h2>
+<h1><a class="anchor" id="extplugins"></a>
+Building plugins outside of lws itself</h1>
 <p>The directory ./plugin-standalone/ shows how easy it is to create plugins outside of lws itself. First build lws itself with -DLWS_WITH_PLUGINS, then use the same flow to build the standalone plugin </p><div class="fragment"><div class="line"><a name="l00001"></a><span class="lineno">    1</span>&#160;cd ./plugin-standalone</div><div class="line"><a name="l00002"></a><span class="lineno">    2</span>&#160;mkdir build</div><div class="line"><a name="l00003"></a><span class="lineno">    3</span>&#160;cd build</div><div class="line"><a name="l00004"></a><span class="lineno">    4</span>&#160;cmake ..</div><div class="line"><a name="l00005"></a><span class="lineno">    5</span>&#160;make &amp;&amp; sudo make install</div></div><!-- fragment --><p>if you changed the default plugin directory when you built lws, you must also give the same arguments to cmake here (eg, <code>-DCMAKE_INSTALL_PREFIX:PATH=/usr/something/else...</code> )</p>
 <p>Otherwise if you run lwsws or libwebsockets-test-server-v2.0, it will now find the additional plugin "libprotocol_example_standalone.so" </p><div class="fragment"><div class="line"><a name="l00001"></a><span class="lineno">    1</span>&#160;lwsts[21257]:   Plugins:</div><div class="line"><a name="l00002"></a><span class="lineno">    2</span>&#160;lwsts[21257]:    libprotocol_dumb_increment.so</div><div class="line"><a name="l00003"></a><span class="lineno">    3</span>&#160;lwsts[21257]:    libprotocol_example_standalone.so</div><div class="line"><a name="l00004"></a><span class="lineno">    4</span>&#160;lwsts[21257]:    libprotocol_lws_mirror.so</div><div class="line"><a name="l00005"></a><span class="lineno">    5</span>&#160;lwsts[21257]:    libprotocol_lws_server_status.so</div><div class="line"><a name="l00006"></a><span class="lineno">    6</span>&#160;lwsts[21257]:    libprotocol_lws_status.so</div></div><!-- fragment --><p> If you have multiple vhosts, you must enable plugins at the vhost additionally, discovered plugins are not enabled automatically for security reasons. You do this using info-&gt;pvo or for lwsws, in the JSON config.</p>
-<h2>Reproducing HTTP2.0 tests </h2>
+<h1><a class="anchor" id="http2rp"></a>
+Reproducing HTTP2.0 tests</h1>
 <p>You must have built and be running lws against a version of openssl that has ALPN / NPN. Most distros still have older versions. You'll know it's right by seeing </p><div class="fragment"><div class="line"><a name="l00001"></a><span class="lineno">    1</span>&#160;lwsts[4752]:  Compiled with OpenSSL support</div><div class="line"><a name="l00002"></a><span class="lineno">    2</span>&#160;lwsts[4752]:  Using SSL mode</div><div class="line"><a name="l00003"></a><span class="lineno">    3</span>&#160;lwsts[4752]:  HTTP2 / ALPN enabled</div></div><!-- fragment --><p> at lws startup.</p>
-<p>For non-SSL HTTP2.0 upgrade </p><div class="fragment"><div class="line"><a name="l00001"></a><span class="lineno">    1</span>&#160;$ nghttp -nvasu http://localhost:7681/test.htm</div></div><!-- fragment --><p> For SSL / ALPN HTTP2.0 upgrade </p><div class="fragment"><div class="line"><a name="l00001"></a><span class="lineno">    1</span>&#160;$ nghttp -nvas https://localhost:7681/test.html</div></div><!-- fragment --><h2>Cross compiling </h2>
+<p>For non-SSL HTTP2.0 upgrade </p><div class="fragment"><div class="line"><a name="l00001"></a><span class="lineno">    1</span>&#160;$ nghttp -nvasu http://localhost:7681/test.htm</div></div><!-- fragment --><p> For SSL / ALPN HTTP2.0 upgrade </p><div class="fragment"><div class="line"><a name="l00001"></a><span class="lineno">    1</span>&#160;$ nghttp -nvas https://localhost:7681/test.html</div></div><!-- fragment --><h1><a class="anchor" id="cross"></a>
+Cross compiling</h1>
 <p>To enable cross-compiling <b>libwebsockets</b> using CMake you need to create a "Toolchain file" that you supply to CMake when generating your build files. CMake will then use the cross compilers and build paths specified in this file to look for dependencies and such.</p>
 <p><b>Libwebsockets</b> includes an example toolchain file <a href="cross-arm-linux-gnueabihf.cmake">cross-arm-linux-gnueabihf.cmake</a> you can use as a starting point.</p>
 <p>The commandline to configure for cross with this would look like </p><div class="fragment"><div class="line"><a name="l00001"></a><span class="lineno">    1</span>&#160;$ cmake .. -DCMAKE_INSTALL_PREFIX:PATH=/usr \</div><div class="line"><a name="l00002"></a><span class="lineno">    2</span>&#160;         -DCMAKE_TOOLCHAIN_FILE=../cross-arm-linux-gnueabihf.cmake \</div><div class="line"><a name="l00003"></a><span class="lineno">    3</span>&#160;         -DWITHOUT_EXTENSIONS=1 -DWITH_SSL=0</div></div><!-- fragment --><p> The example shows how to build with no external cross lib dependencies, you need to provide the cross libraries otherwise.</p>
 <p><b>NOTE</b>: start from an EMPTY build directory if you had a non-cross build in there before the settings will be cached and your changes ignored.</p>
 <p>Additional information on cross compilation with CMake: <a href="http://www.vtk.org/Wiki/CMake_Cross_Compiling">http://www.vtk.org/Wiki/CMake_Cross_Compiling</a></p>
-<h2>Memory efficiency </h2>
+<h1><a class="anchor" id="mem"></a>
+Memory efficiency</h1>
 <p>Embedded server-only configuration without extensions (ie, no compression on websocket connections), but with full v13 websocket features and http server, built on ARM Cortex-A9:</p>
 <p>Update at 8dac94d (2013-02-18) </p><div class="fragment"><div class="line"><a name="l00001"></a><span class="lineno">    1</span>&#160;$ ./configure --without-client --without-extensions --disable-debug --without-daemonize</div><div class="line"><a name="l00002"></a><span class="lineno">    2</span>&#160;</div><div class="line"><a name="l00003"></a><span class="lineno">    3</span>&#160;Context Creation, 1024 fd limit[2]:   16720 (includes 12 bytes per fd)</div><div class="line"><a name="l00004"></a><span class="lineno">    4</span>&#160;Per-connection [3]:                      72 bytes, +1328 during headers</div><div class="line"><a name="l00005"></a><span class="lineno">    5</span>&#160;</div><div class="line"><a name="l00006"></a><span class="lineno">    6</span>&#160;.text   .rodata .data   .bss</div><div class="line"><a name="l00007"></a><span class="lineno">    7</span>&#160;11512   2784    288     4</div></div><!-- fragment --><p> This shows the impact of the major configuration with/without options at 13ba5bbc633ea962d46d using Ubuntu ARM on a PandaBoard ES.</p>
 <p>These are accounting for static allocations from the library elf, there are additional dynamic allocations via malloc. These are a bit old now but give the right idea for relative "expense" of features.</p>
index 570e676..e387406 100644 (file)
@@ -65,13 +65,17 @@ $(document).ready(function(){initNavTree('md_README.coding.html','');});
 <div class="title">Notes about coding with lws </div>  </div>
 </div><!--header-->
 <div class="contents">
-<div class="textblock"><h2>Daemonization </h2>
+<div class="textblock"><h1><a class="anchor" id="dae"></a>
+Daemonization</h1>
 <p>There's a helper api <code>lws_daemonize</code> built by default that does everything you need to daemonize well, including creating a lock file. If you're making what's basically a daemon, just call this early in your init to fork to a headless background process and exit the starting process.</p>
 <p>Notice stdout, stderr, stdin are all redirected to /dev/null to enforce your daemon is headless, so you'll need to sort out alternative logging, by, eg, syslog.</p>
-<h2>Maximum number of connections </h2>
+<h1><a class="anchor" id="conns"></a>
+Maximum number of connections</h1>
 <p>The maximum number of connections the library can deal with is decided when it starts by querying the OS to find out how many file descriptors it is allowed to open (1024 on Fedora for example). It then allocates arrays that allow up to that many connections, minus whatever other file descriptors are in use by the user code.</p>
 <p>If you want to restrict that allocation, or increase it, you can use ulimit or similar to change the avaiable number of file descriptors, and when restarted <b>libwebsockets</b> will adapt accordingly.</p>
-<h2>Libwebsockets is singlethreaded </h2>
+<h1><a class="anchor" id="evtloop"></a>
+Libwebsockets is singlethreaded</h1>
+<p>Libwebsockets works in a serialized event loop, in a single thread.</p>
 <p>Directly performing websocket actions from other threads is not allowed. Aside from the internal data being inconsistent in <code>forked()</code> processes, the scope of a <code>wsi</code> (<code>struct websocket</code>) can end at any time during service with the socket closing and the <code>wsi</code> freed.</p>
 <p>Websocket write activities should only take place in the <code>LWS_CALLBACK_SERVER_WRITEABLE</code> callback as described below.</p>
 <p>[This network-programming necessity to link the issue of new data to the peer taking the previous data is not obvious to all users so let's repeat that in other words:</p>
@@ -83,7 +87,8 @@ $(document).ready(function(){initNavTree('md_README.coding.html','');});
 <p>If you need to service other socket or file descriptors as well as the websocket ones, you can combine them together with the websocket ones in one poll loop, see "External Polling Loop support" below, and still do it all in one thread / process context.</p>
 <p>If you insist on trying to use it from multiple threads, take special care if you might simultaneously create more than one context from different threads.</p>
 <p>SSL_library_init() is called from the context create api and it also is not reentrant. So at least create the contexts sequentially.</p>
-<h2>Only send data when socket writeable </h2>
+<h1><a class="anchor" id="writeable"></a>
+Only send data when socket writeable</h1>
 <p>You should only send data on a websocket connection from the user callback <code>LWS_CALLBACK_SERVER_WRITEABLE</code> (or <code>LWS_CALLBACK_CLIENT_WRITEABLE</code> for clients).</p>
 <p>If you want to send something, do not just send it but request a callback when the socket is writeable using</p>
 <ul>
@@ -92,19 +97,23 @@ $(document).ready(function(){initNavTree('md_README.coding.html','');});
 </ul>
 <p>Usually you will get called back immediately next time around the service loop, but if your peer is slow or temporarily inactive the callback will be delayed accordingly. Generating what to write and sending it should be done in the ...WRITEABLE callback.</p>
 <p>See the test server code for an example of how to do this.</p>
-<h2>Do not rely on only your own WRITEABLE requests appearing </h2>
+<h1><a class="anchor" id="otherwr"></a>
+Do not rely on only your own WRITEABLE requests appearing</h1>
 <p>Libwebsockets may generate additional <code>LWS_CALLBACK_CLIENT_WRITEABLE</code> events if it met network conditions where it had to buffer your send data internally.</p>
 <p>So your code for <code>LWS_CALLBACK_CLIENT_WRITEABLE</code> needs to own the decision about what to send, it can't assume that just because the writeable callback came it really is time to send something.</p>
 <p>It's quite possible you get an 'extra' writeable callback at any time and just need to <code>return 0</code> and wait for the expected callback later.</p>
-<h2>Closing connections from the user side </h2>
+<h1><a class="anchor" id="closing"></a>
+Closing connections from the user side</h1>
 <p>When you want to close a connection, you do it by returning <code>-1</code> from a callback for that connection.</p>
 <p>You can provoke a callback by calling <code>lws_callback_on_writable</code> on the wsi, then notice in the callback you want to close it and just return -1. But usually, the decision to close is made in a callback already and returning -1 is simple.</p>
 <p>If the socket knows the connection is dead, because the peer closed or there was an affirmitive network error like a FIN coming, then <b>libwebsockets</b> will take care of closing the connection automatically.</p>
-<p>If you have a silently dead connection, it's possible to enter a state where the send pipe on the connection is choked but no ack will ever come, so the dead connection will never become writeable. To cover that, you can use TCP keepalives (see later in this document)</p>
-<h2>Fragmented messages </h2>
+<p>If you have a silently dead connection, it's possible to enter a state where the send pipe on the connection is choked but no ack will ever come, so the dead connection will never become writeable. To cover that, you can use TCP keepalives (see later in this document) or pings.</p>
+<h1><a class="anchor" id="frags"></a>
+Fragmented messages</h1>
 <p>To support fragmented messages you need to check for the final frame of a message with <code>lws_is_final_fragment</code>. This check can be combined with <code>libwebsockets_remaining_packet_payload</code> to gather the whole contents of a message, eg:</p>
 <div class="fragment"><div class="line"><a name="l00001"></a><span class="lineno">    1</span>&#160;case LWS_CALLBACK_RECEIVE:</div><div class="line"><a name="l00002"></a><span class="lineno">    2</span>&#160;{</div><div class="line"><a name="l00003"></a><span class="lineno">    3</span>&#160;    Client * const client = (Client *)user;</div><div class="line"><a name="l00004"></a><span class="lineno">    4</span>&#160;    const size_t remaining = lws_remaining_packet_payload(wsi);</div><div class="line"><a name="l00005"></a><span class="lineno">    5</span>&#160;</div><div class="line"><a name="l00006"></a><span class="lineno">    6</span>&#160;    if (!remaining &amp;&amp; lws_is_final_fragment(wsi)) {</div><div class="line"><a name="l00007"></a><span class="lineno">    7</span>&#160;        if (client-&gt;HasFragments()) {</div><div class="line"><a name="l00008"></a><span class="lineno">    8</span>&#160;            client-&gt;AppendMessageFragment(in, len, 0);</div><div class="line"><a name="l00009"></a><span class="lineno">    9</span>&#160;            in = (void *)client-&gt;GetMessage();</div><div class="line"><a name="l00010"></a><span class="lineno">   10</span>&#160;            len = client-&gt;GetMessageLength();</div><div class="line"><a name="l00011"></a><span class="lineno">   11</span>&#160;        }</div><div class="line"><a name="l00012"></a><span class="lineno">   12</span>&#160;</div><div class="line"><a name="l00013"></a><span class="lineno">   13</span>&#160;        client-&gt;ProcessMessage((char *)in, len, wsi);</div><div class="line"><a name="l00014"></a><span class="lineno">   14</span>&#160;        client-&gt;ResetMessage();</div><div class="line"><a name="l00015"></a><span class="lineno">   15</span>&#160;    } else</div><div class="line"><a name="l00016"></a><span class="lineno">   16</span>&#160;        client-&gt;AppendMessageFragment(in, len, remaining);</div><div class="line"><a name="l00017"></a><span class="lineno">   17</span>&#160;}</div><div class="line"><a name="l00018"></a><span class="lineno">   18</span>&#160;break;</div></div><!-- fragment --><p>The test app libwebsockets-test-fraggle sources also show how to deal with fragmented messages.</p>
-<h2>Debug Logging </h2>
+<h1><a class="anchor" id="debuglog"></a>
+Debug Logging</h1>
 <p>Also using <code>lws_set_log_level</code> api you may provide a custom callback to actually emit the log string. By default, this points to an internal emit function that sends to stderr. Setting it to <code>NULL</code> leaves it as it is instead.</p>
 <p>A helper function <code><a class="el" href="group__log.html#gab7c0fc936cc9f1eb58e2bb234c15147c">lwsl_emit_syslog()</a></code> is exported from the library to simplify logging to syslog. You still need to use <code>setlogmask</code>, <code>openlog</code> and <code>closelog</code> in your user code.</p>
 <p>The logging apis are made available for user code.</p>
@@ -116,7 +125,10 @@ $(document).ready(function(){initNavTree('md_README.coding.html','');});
 <li><code>lwsl_debug(...)</code></li>
 </ul>
 <p>The difference between notice and info is that notice will be logged by default whereas info is ignored by default.</p>
-<h2>External Polling Loop support </h2>
+<p>If you are not building with _DEBUG defined, ie, without this</p>
+<div class="fragment"><div class="line"><a name="l00001"></a><span class="lineno">    1</span>&#160;$ cmake .. -DCMAKE_BUILD_TYPE=DEBUG</div></div><!-- fragment --><p>then log levels below notice do not actually get compiled in.</p>
+<h1><a class="anchor" id="extpoll"></a>
+External Polling Loop support</h1>
 <p><b>libwebsockets</b> maintains an internal <code>poll()</code> array for all of its sockets, but you can instead integrate the sockets into an external polling array. That's needed if <b>libwebsockets</b> will cooperate with an existing poll array maintained by another server.</p>
 <p>Four callbacks <code>LWS_CALLBACK_ADD_POLL_FD</code>, <code>LWS_CALLBACK_DEL_POLL_FD</code>, <code>LWS_CALLBACK_SET_MODE_POLL_FD</code> and <code>LWS_CALLBACK_CLEAR_MODE_POLL_FD</code> appear in the callback for protocol 0 and allow interface code to manage socket descriptors in other poll loops.</p>
 <p>You can pass all pollfds that need service to <code><a class="el" href="group__service.html#gad82efa5466d14a9f05aa06416375b28d">lws_service_fd()</a></code>, even if the socket or file does not belong to <b>libwebsockets</b> it is safe.</p>
@@ -127,41 +139,53 @@ $(document).ready(function(){initNavTree('md_README.coding.html','');});
 <li>check the built-in support for the event loop if possible (eg, ./lib/libuv.c) to see how it interfaces to lws</li>
 <li>use LWS_POLLHUP / LWS_POLLIN / LWS_POLLOUT from <a class="el" href="libwebsockets_8h.html">libwebsockets.h</a> to avoid losing windows compatibility</li>
 </ul>
-<h2>Using with in c++ apps </h2>
+<h1><a class="anchor" id="cpp"></a>
+Using with in c++ apps</h1>
 <p>The library is ready for use by C++ apps. You can get started quickly by copying the test server</p>
 <div class="fragment"><div class="line"><a name="l00001"></a><span class="lineno">    1</span>&#160;$ cp test-server/test-server.c test.cpp</div></div><!-- fragment --><p>and building it in C++ like this</p>
 <div class="fragment"><div class="line"><a name="l00001"></a><span class="lineno">    1</span>&#160;$ g++ -DINSTALL_DATADIR=\&quot;/usr/share\&quot; -ocpptest test.cpp -lwebsockets</div></div><!-- fragment --><p><code>INSTALL_DATADIR</code> is only needed because the test server uses it as shipped, if you remove the references to it in your app you don't need to define it on the g++ line either.</p>
-<h2>Availability of header information </h2>
-<p>From v1.2 of the library onwards, the HTTP header content is <code>free()</code>d as soon as the websocket connection is established. For websocket servers, you can copy interesting headers by handling <code>LWS_CALLBACK_FILTER_PROTOCOL_CONNECTION</code> callback, for clients there's a new callback just for this purpose <code>LWS_CALLBACK_CLIENT_FILTER_PRE_ESTABLISH</code>.</p>
-<h2>TCP Keepalive </h2>
+<h1><a class="anchor" id="headerinfo"></a>
+Availability of header information</h1>
+<p>HTTP Header information is managed by a pool of "ah" structs. These are a limited resource so there is pressure to free the headers and return the ah to the pool for reuse.</p>
+<p>For that reason header information on HTTP connections that get upgraded to websockets is lost after the ESTABLISHED callback. Anything important that isn't processed by user code before then should be copied out for later.</p>
+<p>For HTTP connections that don't upgrade, header info remains available the whole time.</p>
+<h1><a class="anchor" id="ka"></a>
+TCP Keepalive</h1>
 <p>It is possible for a connection which is not being used to send to die silently somewhere between the peer and the side not sending. In this case by default TCP will just not report anything and you will never get any more incoming data or sign the link is dead until you try to send.</p>
 <p>To deal with getting a notification of that situation, you can choose to enable TCP keepalives on all <b>libwebsockets</b> sockets, when you create the context.</p>
 <p>To enable keepalive, set the ka_time member of the context creation parameter struct to a nonzero value (in seconds) at context creation time. You should also fill ka_probes and ka_interval in that case.</p>
 <p>With keepalive enabled, the TCP layer will send control packets that should stimulate a response from the peer without affecting link traffic. If the response is not coming, the socket will announce an error at <code>poll()</code> forcing a close.</p>
 <p>Note that BSDs don't support keepalive time / probes / interval per-socket like Linux does. On those systems you can enable keepalive by a nonzero value in <code>ka_time</code>, but the systemwide kernel settings for the time / probes/ interval are used, regardless of what nonzero value is in <code>ka_time</code>.</p>
-<h2>Optimizing SSL connections </h2>
+<h1><a class="anchor" id="sslopt"></a>
+Optimizing SSL connections</h1>
 <p>There's a member <code>ssl_cipher_list</code> in the <code><a class="el" href="structlws__context__creation__info.html">lws_context_creation_info</a></code> struct which allows the user code to restrict the possible cipher selection at context-creation time.</p>
 <p>You might want to look into that to stop the ssl peers selecting a cipher which is too computationally expensive. To use it, point it to a string like </p><pre class="fragment">    `"RC4-MD5:RC4-SHA:AES128-SHA:AES256-SHA:HIGH:!DSS:!aNULL"`
 </pre><p>if left <code>NULL</code>, then the "DEFAULT" set of ciphers are all possible to select.</p>
 <p>You can also set it to <code>"ALL"</code> to allow everything (including insecure ciphers).</p>
-<h2>Async nature of client connections </h2>
+<h1><a class="anchor" id="clientasync"></a>
+Async nature of client connections</h1>
 <p>When you call <code><a class="el" href="structlws__client__connect__info.html">lws_client_connect_info</a>(..)</code> and get a <code>wsi</code> back, it does not mean your connection is active. It just means it started trying to connect.</p>
 <p>Your client connection is actually active only when you receive <code>LWS_CALLBACK_CLIENT_ESTABLISHED</code> for it.</p>
 <p>There's a 5 second timeout for the connection, and it may give up or die for other reasons, if any of that happens you'll get a <code>LWS_CALLBACK_CLIENT_CONNECTION_ERROR</code> callback on protocol 0 instead for the <code>wsi</code>.</p>
 <p>After attempting the connection and getting back a non-<code>NULL</code> <code>wsi</code> you should loop calling <code><a class="el" href="group__service.html#gaf95bd0c663d6516a0c80047d9b1167a8">lws_service()</a></code> until one of the above callbacks occurs.</p>
 <p>As usual, see <a href="test-server/test-client.c">test-client.c</a> for example code.</p>
-<h2>Lws platform-independent file access apis </h2>
+<p>Notice that the client connection api tries to progress the connection somewhat before returning. That means it's possible to get callbacks like CONNECTION_ERROR on the new connection before your user code had a chance to get the wsi returned to identify it (in fact if the connection did fail early, NULL will be returned instead of the wsi anyway).</p>
+<p>To avoid that problem, you can fill in <code>pwsi</code> in the client connection info struct to point to a struct lws that get filled in early by the client connection api with the related wsi. You can then check for that in the callback to confirm the identity of the failing client connection.</p>
+<h1><a class="anchor" id="fileapi"></a>
+Lws platform-independent file access apis</h1>
 <p>lws now exposes his internal platform file abstraction in a way that can be both used by user code to make it platform-agnostic, and be overridden or subclassed by user code. This allows things like handling the URI "directory
 space" as a virtual filesystem that may or may not be backed by a regular filesystem. One example use is serving files from inside large compressed archive storage without having to unpack anything except the file being requested.</p>
 <p>The test server shows how to use it, basically the platform-specific part of lws prepares a file operations structure that lives in the lws context.</p>
 <p>The user code can get a pointer to the file operations struct</p>
 <div class="fragment"><div class="line"><a name="l00001"></a><span class="lineno">    1</span>&#160;LWS_VISIBLE LWS_EXTERN struct lws_plat_file_ops *</div><div class="line"><a name="l00002"></a><span class="lineno">    2</span>&#160;        `lws_get_fops`(struct lws_context *context);</div></div><!-- fragment --><p>and then can use helpers to also leverage these platform-independent file handling apis</p>
 <div class="fragment"><div class="line"><a name="l00001"></a><span class="lineno">    1</span>&#160;static inline lws_filefd_type</div><div class="line"><a name="l00002"></a><span class="lineno">    2</span>&#160;`lws_plat_file_open`(struct lws *wsi, const char *filename, unsigned long *filelen, int flags)</div><div class="line"><a name="l00003"></a><span class="lineno">    3</span>&#160;</div><div class="line"><a name="l00004"></a><span class="lineno">    4</span>&#160;static inline int</div><div class="line"><a name="l00005"></a><span class="lineno">    5</span>&#160;`lws_plat_file_close`(struct lws *wsi, lws_filefd_type fd)</div><div class="line"><a name="l00006"></a><span class="lineno">    6</span>&#160;</div><div class="line"><a name="l00007"></a><span class="lineno">    7</span>&#160;static inline unsigned long</div><div class="line"><a name="l00008"></a><span class="lineno">    8</span>&#160;`lws_plat_file_seek_cur`(struct lws *wsi, lws_filefd_type fd, long offset_from_cur_pos)</div><div class="line"><a name="l00009"></a><span class="lineno">    9</span>&#160;</div><div class="line"><a name="l00010"></a><span class="lineno">   10</span>&#160;static inline int</div><div class="line"><a name="l00011"></a><span class="lineno">   11</span>&#160;`lws_plat_file_read`(struct lws *wsi, lws_filefd_type fd, unsigned long *amount, unsigned char *buf, unsigned long len)</div><div class="line"><a name="l00012"></a><span class="lineno">   12</span>&#160;</div><div class="line"><a name="l00013"></a><span class="lineno">   13</span>&#160;static inline int</div><div class="line"><a name="l00014"></a><span class="lineno">   14</span>&#160;`lws_plat_file_write`(struct lws *wsi, lws_filefd_type fd, unsigned long *amount, unsigned char *buf, unsigned long len)</div></div><!-- fragment --><p>The user code can also override or subclass the file operations, to either wrap or replace them. An example is shown in test server.</p>
-<h2>ECDH Support </h2>
+<h1><a class="anchor" id="ecdh"></a>
+ECDH Support</h1>
 <p>ECDH Certs are now supported. Enable the CMake option </p><pre class="fragment">    cmake .. -DLWS_SSL_SERVER_WITH_ECDH_CERT=1 
 </pre><p><b>and</b> the info-&gt;options flag </p><pre class="fragment">    LWS_SERVER_OPTION_SSL_ECDH
 </pre><p>to build in support and select it at runtime.</p>
-<h2>SMP / Multithreaded service </h2>
+<h1><a class="anchor" id="smp"></a>
+SMP / Multithreaded service</h1>
 <p>SMP support is integrated into LWS without any internal threading. It's very simple to use, libwebsockets-test-server-pthread shows how to do it, use -j &lt;n&gt; argument there to control the number of service threads up to 32.</p>
 <p>Two new members are added to the info struct </p><pre class="fragment">    unsigned int count_threads;
     unsigned int fd_limit_per_thread;
@@ -176,33 +200,40 @@ space" as a virtual filesystem that may or may not be backed by a regular filesy
 <p>Because lws will limit the requested number of actual threads supported according to LWS_MAX_SMP, there is an api lws_get_count_threads(context) to discover how many threads were actually allowed when the context was created.</p>
 <p>It's required to implement locking in the user code in the same way that libwebsockets-test-server-pthread does it, for the FD locking callbacks.</p>
 <p>There is no knowledge or dependency in lws itself about pthreads. How the locking is implemented is entirely up to the user code.</p>
-<h2>Libev / Libuv support </h2>
+<h1><a class="anchor" id="libevuv"></a>
+Libev / Libuv support</h1>
 <p>You can select either or both </p><pre class="fragment">    -DLWS_WITH_LIBEV=1
     -DLWS_WITH_LIBUV=1
 </pre><p>at cmake configure-time. The user application may use one of the context init options flags </p><pre class="fragment">    LWS_SERVER_OPTION_LIBEV
     LWS_SERVER_OPTION_LIBUV
 </pre><p>to indicate it will use either of the event libraries.</p>
-<h2>Extension option control from user code </h2>
+<h1><a class="anchor" id="extopts"></a>
+Extension option control from user code</h1>
 <p>User code may set per-connection extension options now, using a new api <code><a class="el" href="group__extensions.html#gae0e24e1768f83a7fb07896ce975704b9">lws_set_extension_option()</a></code>.</p>
 <p>This should be called from the ESTABLISHED callback like this </p><div class="fragment"><div class="line"><a name="l00001"></a><span class="lineno">    1</span>&#160;lws_set_extension_option(wsi, &quot;permessage-deflate&quot;,</div><div class="line"><a name="l00002"></a><span class="lineno">    2</span>&#160;                         &quot;rx_buf_size&quot;, &quot;12&quot;); /* 1 &lt;&lt; 12 */</div></div><!-- fragment --><p>If the extension is not active (missing or not negotiated for the connection, or extensions are disabled on the library) the call is just returns -1. Otherwise the connection's extension has its named option changed.</p>
 <p>The extension may decide to alter or disallow the change, in the example above permessage-deflate restricts the size of his rx output buffer also considering the protocol's rx_buf_size member.</p>
-<h2>Client connections as HTTP[S] rather than WS[S] </h2>
+<h1><a class="anchor" id="httpsclient"></a>
+Client connections as HTTP[S] rather than WS[S]</h1>
 <p>You may open a generic http client connection using the same struct <a class="el" href="structlws__client__connect__info.html">lws_client_connect_info</a> used to create client ws[s] connections.</p>
 <p>To stay in http[s], set the optional info member "method" to point to the string "GET" instead of the default NULL.</p>
 <p>After the server headers are processed, when payload from the server is available the callback LWS_CALLBACK_RECEIVE_CLIENT_HTTP will be made.</p>
 <p>You can choose whether to process the data immediately, or queue a callback when an outgoing socket is writeable to provide flow control, and process the data in the writable callback.</p>
 <p>Either way you use the api <code>lws_http_client_read()</code> to access the data, eg</p>
-<div class="fragment"><div class="line"><a name="l00001"></a><span class="lineno">    1</span>&#160;case LWS_CALLBACK_RECEIVE_CLIENT_HTTP:</div><div class="line"><a name="l00002"></a><span class="lineno">    2</span>&#160;        {</div><div class="line"><a name="l00003"></a><span class="lineno">    3</span>&#160;                char buffer[1024 + LWS_PRE];</div><div class="line"><a name="l00004"></a><span class="lineno">    4</span>&#160;                char *px = buffer + LWS_PRE;</div><div class="line"><a name="l00005"></a><span class="lineno">    5</span>&#160;                int lenx = sizeof(buffer) - LWS_PRE;</div><div class="line"><a name="l00006"></a><span class="lineno">    6</span>&#160;</div><div class="line"><a name="l00007"></a><span class="lineno">    7</span>&#160;                lwsl_notice(&quot;LWS_CALLBACK_RECEIVE_CLIENT_HTTP\n&quot;);</div><div class="line"><a name="l00008"></a><span class="lineno">    8</span>&#160;</div><div class="line"><a name="l00009"></a><span class="lineno">    9</span>&#160;                /*</div><div class="line"><a name="l00010"></a><span class="lineno">   10</span>&#160;                 * Often you need to flow control this by something</div><div class="line"><a name="l00011"></a><span class="lineno">   11</span>&#160;                 * else being writable.  In that case call the api</div><div class="line"><a name="l00012"></a><span class="lineno">   12</span>&#160;                 * to get a callback when writable here, and do the</div><div class="line"><a name="l00013"></a><span class="lineno">   13</span>&#160;                 * pending client read in the writeable callback of</div><div class="line"><a name="l00014"></a><span class="lineno">   14</span>&#160;                 * the output.</div><div class="line"><a name="l00015"></a><span class="lineno">   15</span>&#160;                 */</div><div class="line"><a name="l00016"></a><span class="lineno">   16</span>&#160;                if (lws_http_client_read(wsi, &amp;px, &amp;lenx) &lt; 0)</div><div class="line"><a name="l00017"></a><span class="lineno">   17</span>&#160;                        return -1;</div><div class="line"><a name="l00018"></a><span class="lineno">   18</span>&#160;                while (lenx--)</div><div class="line"><a name="l00019"></a><span class="lineno">   19</span>&#160;                        putchar(*px++);</div><div class="line"><a name="l00020"></a><span class="lineno">   20</span>&#160;        }</div><div class="line"><a name="l00021"></a><span class="lineno">   21</span>&#160;        break;</div></div><!-- fragment --><h2>Using lws v2 vhosts </h2>
+<div class="fragment"><div class="line"><a name="l00001"></a><span class="lineno">    1</span>&#160;case LWS_CALLBACK_RECEIVE_CLIENT_HTTP:</div><div class="line"><a name="l00002"></a><span class="lineno">    2</span>&#160;        {</div><div class="line"><a name="l00003"></a><span class="lineno">    3</span>&#160;                char buffer[1024 + LWS_PRE];</div><div class="line"><a name="l00004"></a><span class="lineno">    4</span>&#160;                char *px = buffer + LWS_PRE;</div><div class="line"><a name="l00005"></a><span class="lineno">    5</span>&#160;                int lenx = sizeof(buffer) - LWS_PRE;</div><div class="line"><a name="l00006"></a><span class="lineno">    6</span>&#160;</div><div class="line"><a name="l00007"></a><span class="lineno">    7</span>&#160;                lwsl_notice(&quot;LWS_CALLBACK_RECEIVE_CLIENT_HTTP\n&quot;);</div><div class="line"><a name="l00008"></a><span class="lineno">    8</span>&#160;</div><div class="line"><a name="l00009"></a><span class="lineno">    9</span>&#160;                /*</div><div class="line"><a name="l00010"></a><span class="lineno">   10</span>&#160;                 * Often you need to flow control this by something</div><div class="line"><a name="l00011"></a><span class="lineno">   11</span>&#160;                 * else being writable.  In that case call the api</div><div class="line"><a name="l00012"></a><span class="lineno">   12</span>&#160;                 * to get a callback when writable here, and do the</div><div class="line"><a name="l00013"></a><span class="lineno">   13</span>&#160;                 * pending client read in the writeable callback of</div><div class="line"><a name="l00014"></a><span class="lineno">   14</span>&#160;                 * the output.</div><div class="line"><a name="l00015"></a><span class="lineno">   15</span>&#160;                 */</div><div class="line"><a name="l00016"></a><span class="lineno">   16</span>&#160;                if (lws_http_client_read(wsi, &amp;px, &amp;lenx) &lt; 0)</div><div class="line"><a name="l00017"></a><span class="lineno">   17</span>&#160;                        return -1;</div><div class="line"><a name="l00018"></a><span class="lineno">   18</span>&#160;                while (lenx--)</div><div class="line"><a name="l00019"></a><span class="lineno">   19</span>&#160;                        putchar(*px++);</div><div class="line"><a name="l00020"></a><span class="lineno">   20</span>&#160;        }</div><div class="line"><a name="l00021"></a><span class="lineno">   21</span>&#160;        break;</div></div><!-- fragment --><p>Notice that if you will use SSL client connections on a vhost, you must prepare the client SSL context for the vhost after creating the vhost, since this is not normally done if the vhost was set up to listen / serve. Call the api <a class="el" href="group__client.html#ga4f44b8230e6732816ca5cd8d1aaaf340">lws_init_vhost_client_ssl()</a> to also allow client SSL on the vhost.</p>
+<h1><a class="anchor" id="vhosts"></a>
+Using lws vhosts</h1>
 <p>If you set LWS_SERVER_OPTION_EXPLICIT_VHOSTS options flag when you create your context, it won't create a default vhost using the info struct members for compatibility. Instead you can call <a class="el" href="group__context-and-vhost.html#ga0c54c667ccd9b8b3dddcd123ca72f87c">lws_create_vhost()</a> afterwards to attach one or more vhosts manually.</p>
 <div class="fragment"><div class="line"><a name="l00001"></a><span class="lineno">    1</span>&#160;LWS_VISIBLE struct lws_vhost *</div><div class="line"><a name="l00002"></a><span class="lineno">    2</span>&#160;lws_create_vhost(struct lws_context *context,</div><div class="line"><a name="l00003"></a><span class="lineno">    3</span>&#160;                 struct lws_context_creation_info *info,</div><div class="line"><a name="l00004"></a><span class="lineno">    4</span>&#160;                 struct lws_http_mount *mounts);</div></div><!-- fragment --><p><a class="el" href="group__context-and-vhost.html#ga0c54c667ccd9b8b3dddcd123ca72f87c">lws_create_vhost()</a> uses the same info struct as <a class="el" href="group__context-and-vhost.html#gaf2fff58562caab7510c41eeac85a8648">lws_create_context()</a>, it ignores members related to context and uses the ones meaningful for vhost (marked with VH in <a class="el" href="libwebsockets_8h.html">libwebsockets.h</a>).</p>
 <div class="fragment"><div class="line"><a name="l00001"></a><span class="lineno">    1</span>&#160;struct lws_context_creation_info {</div><div class="line"><a name="l00002"></a><span class="lineno">    2</span>&#160;        int port;                                       /* VH */</div><div class="line"><a name="l00003"></a><span class="lineno">    3</span>&#160;        const char *iface;                              /* VH */</div><div class="line"><a name="l00004"></a><span class="lineno">    4</span>&#160;        const struct lws_protocols *protocols;          /* VH */</div><div class="line"><a name="l00005"></a><span class="lineno">    5</span>&#160;        const struct lws_extension *extensions;         /* VH */</div><div class="line"><a name="l00006"></a><span class="lineno">    6</span>&#160;...</div></div><!-- fragment --><p>When you attach the vhost, if the vhost's port already has a listen socket then both vhosts share it and use SNI (is SSL in use) or the Host: header from the client to select the right one. Or if no other vhost already listening the a new listen socket is created.</p>
 <p>There are some new members but mainly it's stuff you used to set at context creation time.</p>
-<h2>How lws matches hostname or SNI to a vhost </h2>
+<h1><a class="anchor" id="sni"></a>
+How lws matches hostname or SNI to a vhost</h1>
 <p>LWS first strips any trailing :port number.</p>
 <p>Then it tries to find an exact name match for a vhost listening on the correct port, ie, if SNI or the Host: header provided abc.com:1234, it will match on a vhost named abc.com that is listening on port 1234.</p>
 <p>If there is no exact match, lws will consider wildcard matches, for example if cats.abc.com:1234 is provided by the client by SNI or Host: header, it will accept a vhost "abc.com" listening on port 1234. If there was a better, exact, match, it will have been chosen in preference to this.</p>
 <p>Connections with SSL will still have the client go on to check the certificate allows wildcards and error out if not.</p>
-<h2>Using lws v2 mounts on a vhost </h2>
+<h1><a class="anchor" id="mounts"></a>
+Using lws mounts on a vhost</h1>
 <p>The last argument to <a class="el" href="group__context-and-vhost.html#ga0c54c667ccd9b8b3dddcd123ca72f87c">lws_create_vhost()</a> lets you associate a linked list of <a class="el" href="structlws__http__mount.html">lws_http_mount</a> structures with that vhost's URL 'namespace', in a similar way that unix lets you mount filesystems into areas of your / filesystem how you like and deal with the contents transparently.</p>
 <div class="fragment"><div class="line"><a name="l00001"></a><span class="lineno">    1</span>&#160;struct lws_http_mount {</div><div class="line"><a name="l00002"></a><span class="lineno">    2</span>&#160;        struct lws_http_mount *mount_next;</div><div class="line"><a name="l00003"></a><span class="lineno">    3</span>&#160;        const char *mountpoint; /* mountpoint in http pathspace, eg, &quot;/&quot; */</div><div class="line"><a name="l00004"></a><span class="lineno">    4</span>&#160;        const char *origin; /* path to be mounted, eg, &quot;/var/www/warmcat.com&quot; */</div><div class="line"><a name="l00005"></a><span class="lineno">    5</span>&#160;        const char *def; /* default target, eg, &quot;index.html&quot; */</div><div class="line"><a name="l00006"></a><span class="lineno">    6</span>&#160;</div><div class="line"><a name="l00007"></a><span class="lineno">    7</span>&#160;        struct lws_protocol_vhost_options *cgienv;</div><div class="line"><a name="l00008"></a><span class="lineno">    8</span>&#160;</div><div class="line"><a name="l00009"></a><span class="lineno">    9</span>&#160;        int cgi_timeout;</div><div class="line"><a name="l00010"></a><span class="lineno">   10</span>&#160;        int cache_max_age;</div><div class="line"><a name="l00011"></a><span class="lineno">   11</span>&#160;</div><div class="line"><a name="l00012"></a><span class="lineno">   12</span>&#160;        unsigned int cache_reusable:1;</div><div class="line"><a name="l00013"></a><span class="lineno">   13</span>&#160;        unsigned int cache_revalidate:1;</div><div class="line"><a name="l00014"></a><span class="lineno">   14</span>&#160;        unsigned int cache_intermediaries:1;</div><div class="line"><a name="l00015"></a><span class="lineno">   15</span>&#160;</div><div class="line"><a name="l00016"></a><span class="lineno">   16</span>&#160;        unsigned char origin_protocol;</div><div class="line"><a name="l00017"></a><span class="lineno">   17</span>&#160;        unsigned char mountpoint_len;</div><div class="line"><a name="l00018"></a><span class="lineno">   18</span>&#160;};</div></div><!-- fragment --><p>The last mount structure should have a NULL mount_next, otherwise it should point to the 'next' mount structure in your list.</p>
 <p>Both the mount structures and the strings must persist until the context is destroyed, since they are not copied but used in place.</p>
@@ -213,7 +244,8 @@ space" as a virtual filesystem that may or may not be backed by a regular filesy
 <li>LWSMPRO_REDIR_HTTP and LWSMPRO_REDIR_HTTPS auto-redirect clients to the given origin URL.</li>
 <li>LWSMPRO_CALLBACK causes the http connection to attach to the callback associated with the named protocol (which may be a plugin).</li>
 </ul>
-<h2>Operation of LWSMPRO_CALLBACK mounts </h2>
+<h1><a class="anchor" id="mountcallback"></a>
+Operation of LWSMPRO_CALLBACK mounts</h1>
 <p>The feature provided by CALLBACK type mounts is binding a part of the URL namespace to a named protocol callback handler.</p>
 <p>This allows protocol plugins to handle areas of the URL namespace. For example in test-server-v2.0.c, the URL area "/formtest" is associated with the plugin providing "protocol-post-demo" like this</p>
 <div class="fragment"><div class="line"><a name="l00001"></a><span class="lineno">    1</span>&#160;static const struct lws_http_mount mount_post = {</div><div class="line"><a name="l00002"></a><span class="lineno">    2</span>&#160;        NULL,           /* linked-list pointer to next*/</div><div class="line"><a name="l00003"></a><span class="lineno">    3</span>&#160;        &quot;/formtest&quot;,            /* mountpoint in URL namespace on this vhost */</div><div class="line"><a name="l00004"></a><span class="lineno">    4</span>&#160;        &quot;protocol-post-demo&quot;,   /* handler */</div><div class="line"><a name="l00005"></a><span class="lineno">    5</span>&#160;        NULL,   /* default filename if none given */</div><div class="line"><a name="l00006"></a><span class="lineno">    6</span>&#160;        NULL,</div><div class="line"><a name="l00007"></a><span class="lineno">    7</span>&#160;        0,</div><div class="line"><a name="l00008"></a><span class="lineno">    8</span>&#160;        0,</div><div class="line"><a name="l00009"></a><span class="lineno">    9</span>&#160;        0,</div><div class="line"><a name="l00010"></a><span class="lineno">   10</span>&#160;        0,</div><div class="line"><a name="l00011"></a><span class="lineno">   11</span>&#160;        0,</div><div class="line"><a name="l00012"></a><span class="lineno">   12</span>&#160;        LWSMPRO_CALLBACK,       /* origin points to a callback */</div><div class="line"><a name="l00013"></a><span class="lineno">   13</span>&#160;        9,                      /* strlen(&quot;/formtest&quot;), ie length of the mountpoint */</div><div class="line"><a name="l00014"></a><span class="lineno">   14</span>&#160;};</div></div><!-- fragment --><p>Client access to /formtest[anything] will be passed to the callback registered with the named protocol, which in this case is provided by a protocol plugin.</p>
index 0f4efdc..fe30e5e 100644 (file)
@@ -65,10 +65,12 @@ $(document).ready(function(){initNavTree('md_README.generic-sessions.html','');}
 <div class="title">Notes about generic-sessions Plugin </div>  </div>
 </div><!--header-->
 <div class="contents">
-<div class="textblock"><h2>Enabling for build </h2>
+<div class="textblock"><h1><a class="anchor" id="gseb"></a>
+Enabling lwsgs for build</h1>
 <p>Enable at CMake with -DLWS_WITH_GENERIC_SESSIONS=1</p>
 <p>This also needs sqlite3 (libsqlite3-dev or similar package)</p>
-<h2>Introduction </h2>
+<h1><a class="anchor" id="gsi"></a>
+lwsgs Introduction</h1>
 <p>The generic-sessions protocol plugin provides cookie-based login authentication for lws web and ws connections.</p>
 <p>The plugin handles everything about generic account registration, email verification, lost password, account deletion, and other generic account management.</p>
 <p>Other code, in another eg, ws protocol handler, only needs very high-level state information from generic-sessions, ie, which user the client is authenticated as. Everything underneath is managed in generic-sessions.</p>
@@ -86,21 +88,24 @@ $(document).ready(function(){initNavTree('md_README.generic-sessions.html','');}
 <li>32-bit bitfield for authentication sectoring, mounts can provide a mask on the loggin-in session's associated server-side bitfield that must be set for access.</li>
 <li>No code (just config) required for, eg, private URL namespace that requires login to access.</li>
 </ul>
-<h2>Integration to HTML </h2>
+<h1><a class="anchor" id="gsin"></a>
+Lwsgs Integration to HTML</h1>
 <p>Only three steps are needed to integrate lwsgs in your HTML.</p>
 <p>1) lwsgs HTML UI is bundled with the javascript it uses in <code>lwsgs.js</code>, so import that script file in your head section</p>
 <p>2) define an empty div of id "lwsgs" somewhere</p>
 <p>3) Call lwsgs_initial() in your page</p>
 <p>That's it. An example is below</p>
-<div class="fragment"><div class="line"><a name="l00001"></a><span class="lineno">    1</span>&#160;&lt;html&gt;</div><div class="line"><a name="l00002"></a><span class="lineno">    2</span>&#160; &lt;head&gt;</div><div class="line"><a name="l00003"></a><span class="lineno">    3</span>&#160;  &lt;script src=&quot;lwsgs.js&quot;&gt;&lt;/script&gt;</div><div class="line"><a name="l00004"></a><span class="lineno">    4</span>&#160;  &lt;style&gt;</div><div class="line"><a name="l00005"></a><span class="lineno">    5</span>&#160;     .body { font-size: 12 }</div><div class="line"><a name="l00006"></a><span class="lineno">    6</span>&#160;     .gstitle { font-size: 18 }</div><div class="line"><a name="l00007"></a><span class="lineno">    7</span>&#160;  &lt;/style&gt;</div><div class="line"><a name="l00008"></a><span class="lineno">    8</span>&#160;  &lt;/head&gt;</div><div class="line"><a name="l00009"></a><span class="lineno">    9</span>&#160;  &lt;body style=&quot;background-image:url(seats.jpg)&quot;&gt;</div><div class="line"><a name="l00010"></a><span class="lineno">   10</span>&#160;    &lt;table style=&quot;width:100%;transition: max-height 2s;&quot;&gt;</div><div class="line"><a name="l00011"></a><span class="lineno">   11</span>&#160;     &lt;tr&gt;</div><div class="line"><a name="l00012"></a><span class="lineno">   12</span>&#160;      &lt;td style=&quot;vertical-align:top;text-align:left;width=200px&quot;&gt;</div><div class="line"><a name="l00013"></a><span class="lineno">   13</span>&#160;       &lt;img src=&quot;lwsgs-logo.png&quot;&gt;</div><div class="line"><a name="l00014"></a><span class="lineno">   14</span>&#160;      &lt;/td&gt;</div><div class="line"><a name="l00015"></a><span class="lineno">   15</span>&#160;      &lt;td style=&quot;vertical-align:top;float:right&quot;&gt;</div><div class="line"><a name="l00016"></a><span class="lineno">   16</span>&#160;        &lt;div id=lwsgs style=&quot;text-align:right;background-color: rgba(255, 255, 255, 0.8);&quot;&gt;&lt;/div&gt;</div><div class="line"><a name="l00017"></a><span class="lineno">   17</span>&#160;      &lt;/td&gt;</div><div class="line"><a name="l00018"></a><span class="lineno">   18</span>&#160;     &lt;/tr&gt;</div><div class="line"><a name="l00019"></a><span class="lineno">   19</span>&#160;    &lt;/table&gt;</div><div class="line"><a name="l00020"></a><span class="lineno">   20</span>&#160;   &lt;/form&gt;</div><div class="line"><a name="l00021"></a><span class="lineno">   21</span>&#160;</div><div class="line"><a name="l00022"></a><span class="lineno">   22</span>&#160;   &lt;script&gt;lwsgs_initial();&lt;/script&gt;</div><div class="line"><a name="l00023"></a><span class="lineno">   23</span>&#160;</div><div class="line"><a name="l00024"></a><span class="lineno">   24</span>&#160; &lt;/body&gt;</div><div class="line"><a name="l00025"></a><span class="lineno">   25</span>&#160;&lt;/html&gt;</div></div><!-- fragment --> <h2>Overall Flow </h2>
+<div class="fragment"><div class="line"><a name="l00001"></a><span class="lineno">    1</span>&#160;&lt;html&gt;</div><div class="line"><a name="l00002"></a><span class="lineno">    2</span>&#160; &lt;head&gt;</div><div class="line"><a name="l00003"></a><span class="lineno">    3</span>&#160;  &lt;script src=&quot;lwsgs.js&quot;&gt;&lt;/script&gt;</div><div class="line"><a name="l00004"></a><span class="lineno">    4</span>&#160;  &lt;style&gt;</div><div class="line"><a name="l00005"></a><span class="lineno">    5</span>&#160;     .body { font-size: 12 }</div><div class="line"><a name="l00006"></a><span class="lineno">    6</span>&#160;     .gstitle { font-size: 18 }</div><div class="line"><a name="l00007"></a><span class="lineno">    7</span>&#160;  &lt;/style&gt;</div><div class="line"><a name="l00008"></a><span class="lineno">    8</span>&#160;  &lt;/head&gt;</div><div class="line"><a name="l00009"></a><span class="lineno">    9</span>&#160;  &lt;body style=&quot;background-image:url(seats.jpg)&quot;&gt;</div><div class="line"><a name="l00010"></a><span class="lineno">   10</span>&#160;    &lt;table style=&quot;width:100%;transition: max-height 2s;&quot;&gt;</div><div class="line"><a name="l00011"></a><span class="lineno">   11</span>&#160;     &lt;tr&gt;</div><div class="line"><a name="l00012"></a><span class="lineno">   12</span>&#160;      &lt;td style=&quot;vertical-align:top;text-align:left;width=200px&quot;&gt;</div><div class="line"><a name="l00013"></a><span class="lineno">   13</span>&#160;       &lt;img src=&quot;lwsgs-logo.png&quot;&gt;</div><div class="line"><a name="l00014"></a><span class="lineno">   14</span>&#160;      &lt;/td&gt;</div><div class="line"><a name="l00015"></a><span class="lineno">   15</span>&#160;      &lt;td style=&quot;vertical-align:top;float:right&quot;&gt;</div><div class="line"><a name="l00016"></a><span class="lineno">   16</span>&#160;        &lt;div id=lwsgs style=&quot;text-align:right;background-color: rgba(255, 255, 255, 0.8);&quot;&gt;&lt;/div&gt;</div><div class="line"><a name="l00017"></a><span class="lineno">   17</span>&#160;      &lt;/td&gt;</div><div class="line"><a name="l00018"></a><span class="lineno">   18</span>&#160;     &lt;/tr&gt;</div><div class="line"><a name="l00019"></a><span class="lineno">   19</span>&#160;    &lt;/table&gt;</div><div class="line"><a name="l00020"></a><span class="lineno">   20</span>&#160;   &lt;/form&gt;</div><div class="line"><a name="l00021"></a><span class="lineno">   21</span>&#160;</div><div class="line"><a name="l00022"></a><span class="lineno">   22</span>&#160;   &lt;script&gt;lwsgs_initial();&lt;/script&gt;</div><div class="line"><a name="l00023"></a><span class="lineno">   23</span>&#160;</div><div class="line"><a name="l00024"></a><span class="lineno">   24</span>&#160; &lt;/body&gt;</div><div class="line"><a name="l00025"></a><span class="lineno">   25</span>&#160;&lt;/html&gt;</div></div><!-- fragment --><h1><a class="anchor" id="gsof"></a>
+Lwsgs Overall Flow@</h1>
 <p>When the protocol is initialized, it gets per-vhost information from the config, such as where the sqlite3 databases are to be stored. The admin username and sha-1 of the admin password are also taken from here.</p>
 <p>In the mounts using protocol-generic-sessions, a cookie is maintained against any requests; if no cookie was active on the initial request a new session is created with no attached user.</p>
 <p>So there should always be an active session after any transactions with the server.</p>
 <p>In the example html going to the mount /lwsgs loads a login / register page as the default.</p>
 <p>The &lt;form&gt; in the login page contains 'next url' hidden inputs that let the html 'program' where the form handler will go after a successful admin login, a successful user login and a failed login.</p>
 <p>After a successful login, the sqlite record at the server for the current session is updated to have the logged-in username associated with it.</p>
-<h2>Configuration </h2>
-<p>"auth-mask" defines the autorization sector bits that must be enabled on the session to gain access.</p>
+<h1><a class="anchor" id="gsconf"></a>
+Lwsgs Configuration</h1>
+<p>"auth-mask" defines the authorization sector bits that must be enabled on the session to gain access.</p>
 <p>"auth-mask" 0 is the default.</p>
 <ul>
 <li>b0 is set if you are logged in as a user at all.</li>
@@ -121,16 +126,21 @@ $(document).ready(function(){initNavTree('md_README.generic-sessions.html','');}
 </ul>
 <p>The real protocol that makes use of generic-sessions must also be listed and any configuration it needs given</p>
 <div class="fragment"><div class="line"><a name="l00001"></a><span class="lineno">    1</span>&#160;&quot;protocol-lws-messageboard&quot;: {</div><div class="line"><a name="l00002"></a><span class="lineno">    2</span>&#160;  &quot;status&quot;: &quot;ok&quot;,</div><div class="line"><a name="l00003"></a><span class="lineno">    3</span>&#160;  &quot;message-db&quot;: &quot;/var/www/sessions/messageboard.sqlite3&quot;</div><div class="line"><a name="l00004"></a><span class="lineno">    4</span>&#160;},</div></div><!-- fragment --><p>Notice the real application uses his own sqlite db, no details about how generic-sessions works or how it stores data are available to it.</p>
-<h2>Password Confounder </h2>
+<h1><a class="anchor" id="gspwc"></a>
+Lwsgs Password Confounder</h1>
 <p>You can also define a per-vhost confounder shown in the example above, used when aggregating the password with the salt when it is hashed. Any attacker will also need to get the confounder along with the database, which you can make harder by making the config dir only eneterable / readable by root.</p>
-<h2>Preparing the db directory </h2>
+<h1><a class="anchor" id="gsprep"></a>
+Lwsgs Preparing the db directory</h1>
 <p>You will have to prepare the db directory so it's suitable for the lwsws user to use, that usually means apache, eg</p>
-<div class="fragment"><div class="line"><a name="l00001"></a><span class="lineno">    1</span>&#160;# mkdir -p /var/www/sessions</div><div class="line"><a name="l00002"></a><span class="lineno">    2</span>&#160;# chown root:apache /var/www/sessions</div><div class="line"><a name="l00003"></a><span class="lineno">    3</span>&#160;# chmod 770 /var/www/sessions</div></div><!-- fragment --><h2>Email configuration </h2>
+<div class="fragment"><div class="line"><a name="l00001"></a><span class="lineno">    1</span>&#160;# mkdir -p /var/www/sessions</div><div class="line"><a name="l00002"></a><span class="lineno">    2</span>&#160;# chown root:apache /var/www/sessions</div><div class="line"><a name="l00003"></a><span class="lineno">    3</span>&#160;# chmod 770 /var/www/sessions</div></div><!-- fragment --><h1><a class="anchor" id="gsrmail"></a>
+Lwsgs Email configuration</h1>
 <p>lwsgs will can send emails by talking to an SMTP server on localhost:25. That will usually be sendmail or postfix, you should confirm that works first by itself using the <code>mail</code> application to send on it.</p>
 <p>lwsgs has been tested on stock Fedora sendmail and postfix.</p>
-<h2>Integration with another protocol </h2>
+<h1><a class="anchor" id="gsap"></a>
+Lwsgs Integration with another protocol</h1>
 <p>lwsgs is designed to provide sessions and accounts in a standalone and generic way.</p>
 <p>But it's not useful by itself, there will always be the actual application who wants to make use of generic-sessions features.</p>
+<p>We provide the "messageboard" plugin as an example of how to integrate with your actual application protocol.</p>
 <p>The basic approach is the 'real' protocol handler (usually a plugin itself) subclasses the generic-sessions plugin and calls through to it by default.</p>
 <p>The "real" protocol handler entirely deals with ws-related stuff itself, since generic-sessions does not use ws. But for</p>
 <ul>
@@ -145,7 +155,7 @@ $(document).ready(function(){initNavTree('md_README.generic-sessions.html','');}
 <div class="fragment"><div class="line"><a name="l00001"></a><span class="lineno">    1</span>&#160;struct per_session_data__myapp {</div><div class="line"><a name="l00002"></a><span class="lineno">    2</span>&#160;        void *pss_gs;</div><div class="line"><a name="l00003"></a><span class="lineno">    3</span>&#160;...</div><div class="line"><a name="l00004"></a><span class="lineno">    4</span>&#160;</div><div class="line"><a name="l00005"></a><span class="lineno">    5</span>&#160;        pss-&gt;pss_gs = malloc(vhd-&gt;gsp-&gt;per_session_data_size);</div></div><!-- fragment --><p>The allocation reserved for generic-sessions is then used as user_space when the real protocol calls through to the generic-sessions callback</p>
 <div class="fragment"><div class="line"><a name="l00001"></a><span class="lineno">    1</span>&#160;vhd-&gt;gsp-&gt;callback(wsi, reason, &amp;pss-&gt;pss_gs, in, len);</div></div><!-- fragment --><p>In that way the "real" protocol can subclass generic-sessions functionality.</p>
 <p>To ease management of these secondary allocations, there are callbacks that occur when a wsi binds to a protocol and when the binding is dropped. These should be used to malloc and free and kind of per-connection secondary allocations.</p>
-<div class="fragment"><div class="line"><a name="l00001"></a><span class="lineno">    1</span>&#160;case LWS_CALLBACK_HTTP_BIND_PROTOCOL:</div><div class="line"><a name="l00002"></a><span class="lineno">    2</span>&#160;        if (!pss || pss-&gt;pss_gs)</div><div class="line"><a name="l00003"></a><span class="lineno">    3</span>&#160;                break;</div><div class="line"><a name="l00004"></a><span class="lineno">    4</span>&#160;</div><div class="line"><a name="l00005"></a><span class="lineno">    5</span>&#160;        pss-&gt;pss_gs = malloc(vhd-&gt;gsp-&gt;per_session_data_size);</div><div class="line"><a name="l00006"></a><span class="lineno">    6</span>&#160;        if (!pss-&gt;pss_gs)</div><div class="line"><a name="l00007"></a><span class="lineno">    7</span>&#160;                return -1;</div><div class="line"><a name="l00008"></a><span class="lineno">    8</span>&#160;</div><div class="line"><a name="l00009"></a><span class="lineno">    9</span>&#160;        memset(pss-&gt;pss_gs, 0, vhd-&gt;gsp-&gt;per_session_data_size);</div><div class="line"><a name="l00010"></a><span class="lineno">   10</span>&#160;        break;</div><div class="line"><a name="l00011"></a><span class="lineno">   11</span>&#160;</div><div class="line"><a name="l00012"></a><span class="lineno">   12</span>&#160;case LWS_CALLBACK_HTTP_DROP_PROTOCOL:</div><div class="line"><a name="l00013"></a><span class="lineno">   13</span>&#160;        if (vhd-&gt;gsp-&gt;callback(wsi, reason, pss ? pss-&gt;pss_gs : NULL, in, len))</div><div class="line"><a name="l00014"></a><span class="lineno">   14</span>&#160;                return -1;</div><div class="line"><a name="l00015"></a><span class="lineno">   15</span>&#160;</div><div class="line"><a name="l00016"></a><span class="lineno">   16</span>&#160;        if (pss-&gt;pss_gs) {</div><div class="line"><a name="l00017"></a><span class="lineno">   17</span>&#160;                free(pss-&gt;pss_gs);</div><div class="line"><a name="l00018"></a><span class="lineno">   18</span>&#160;                pss-&gt;pss_gs = NULL;</div><div class="line"><a name="l00019"></a><span class="lineno">   19</span>&#160;        }</div><div class="line"><a name="l00020"></a><span class="lineno">   20</span>&#160;        break;</div></div><!-- fragment --><h2>Getting session-specific information from another protocol </h2>
+<div class="fragment"><div class="line"><a name="l00001"></a><span class="lineno">    1</span>&#160;case LWS_CALLBACK_HTTP_BIND_PROTOCOL:</div><div class="line"><a name="l00002"></a><span class="lineno">    2</span>&#160;        if (!pss || pss-&gt;pss_gs)</div><div class="line"><a name="l00003"></a><span class="lineno">    3</span>&#160;                break;</div><div class="line"><a name="l00004"></a><span class="lineno">    4</span>&#160;</div><div class="line"><a name="l00005"></a><span class="lineno">    5</span>&#160;        pss-&gt;pss_gs = malloc(vhd-&gt;gsp-&gt;per_session_data_size);</div><div class="line"><a name="l00006"></a><span class="lineno">    6</span>&#160;        if (!pss-&gt;pss_gs)</div><div class="line"><a name="l00007"></a><span class="lineno">    7</span>&#160;                return -1;</div><div class="line"><a name="l00008"></a><span class="lineno">    8</span>&#160;</div><div class="line"><a name="l00009"></a><span class="lineno">    9</span>&#160;        memset(pss-&gt;pss_gs, 0, vhd-&gt;gsp-&gt;per_session_data_size);</div><div class="line"><a name="l00010"></a><span class="lineno">   10</span>&#160;        break;</div><div class="line"><a name="l00011"></a><span class="lineno">   11</span>&#160;</div><div class="line"><a name="l00012"></a><span class="lineno">   12</span>&#160;case LWS_CALLBACK_HTTP_DROP_PROTOCOL:</div><div class="line"><a name="l00013"></a><span class="lineno">   13</span>&#160;        if (vhd-&gt;gsp-&gt;callback(wsi, reason, pss ? pss-&gt;pss_gs : NULL, in, len))</div><div class="line"><a name="l00014"></a><span class="lineno">   14</span>&#160;                return -1;</div><div class="line"><a name="l00015"></a><span class="lineno">   15</span>&#160;</div><div class="line"><a name="l00016"></a><span class="lineno">   16</span>&#160;        if (pss-&gt;pss_gs) {</div><div class="line"><a name="l00017"></a><span class="lineno">   17</span>&#160;                free(pss-&gt;pss_gs);</div><div class="line"><a name="l00018"></a><span class="lineno">   18</span>&#160;                pss-&gt;pss_gs = NULL;</div><div class="line"><a name="l00019"></a><span class="lineno">   19</span>&#160;        }</div><div class="line"><a name="l00020"></a><span class="lineno">   20</span>&#160;        break;</div></div><!-- fragment --><p>#section gsapsib Getting session-specific information from another protocol</p>
 <p>At least at the time when someone tries to upgrade an http(s) connection to ws(s) with your real protocol, it is necessary to confirm the cookie the http(s) connection has with generic-sessions and find out his username and other info.</p>
 <p>Generic sessions lets another protocol check it again by calling his callback, and lws itself provides a generic session info struct to pass the related data</p>
 <div class="fragment"><div class="line"><a name="l00001"></a><span class="lineno">    1</span>&#160;struct lws_session_info {</div><div class="line"><a name="l00002"></a><span class="lineno">    2</span>&#160;        char username[32];</div><div class="line"><a name="l00003"></a><span class="lineno">    3</span>&#160;        char email[100];</div><div class="line"><a name="l00004"></a><span class="lineno">    4</span>&#160;        char ip[72];</div><div class="line"><a name="l00005"></a><span class="lineno">    5</span>&#160;        unsigned int mask;</div><div class="line"><a name="l00006"></a><span class="lineno">    6</span>&#160;        char session[42];</div><div class="line"><a name="l00007"></a><span class="lineno">    7</span>&#160;};</div><div class="line"><a name="l00008"></a><span class="lineno">    8</span>&#160;</div><div class="line"><a name="l00009"></a><span class="lineno">    9</span>&#160;struct lws_session_info sinfo;</div><div class="line"><a name="l00010"></a><span class="lineno">   10</span>&#160;...</div><div class="line"><a name="l00011"></a><span class="lineno">   11</span>&#160;vhd-&gt;gsp-&gt;callback(wsi, LWS_CALLBACK_SESSION_INFO,</div><div class="line"><a name="l00012"></a><span class="lineno">   12</span>&#160;                           &amp;pss-&gt;pss_gs, &amp;sinfo, 0);</div></div><!-- fragment --><p>After the call to generic-sessions, the results can be</p>
diff --git a/doc/html/md_README.generic-table.html b/doc/html/md_README.generic-table.html
new file mode 100644 (file)
index 0000000..1794170
--- /dev/null
@@ -0,0 +1,171 @@
+<!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: Notes about generic-table</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&#160;Page</span></a></li>
+      <li class="current"><a href="pages.html"><span>Related&#160;Pages</span></a></li>
+      <li><a href="modules.html"><span>Modules</span></a></li>
+      <li><a href="annotated.html"><span>Data&#160;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('md_README.generic-table.html','');});
+</script>
+<div id="doc-content">
+<div class="header">
+  <div class="headertitle">
+<div class="title">Notes about generic-table </div>  </div>
+</div><!--header-->
+<div class="contents">
+<div class="textblock"><h1><a class="anchor" id="gtint"></a>
+What is generic-table?</h1>
+<p>Generic-table is a JSON schema and client-side JS file that makes it easy to display live, table structured HTML over a ws link.</p>
+<p>An example plugin and index.html using it are provided, but lwsgt itself doesn't have its own plugin, it's just a JSON schema and client-side JS that other plugins can use to simplify displaying live, table-based data without having to reinvent the wheel each time.</p>
+<p>The ws protocol sends JSON describing the table, and then JSON updating the table contents when it chooses, the brower table is updated automatically, live.</p>
+<div class="image">
+<img src="lwsgt-overview.png" alt="lwsgt-overview.png"/>
+</div>
+<ul>
+<li>Example protocol plugin (displays directory contents): <a href="https://github.com/warmcat/libwebsockets/tree/master/plugins/generic-table/protocol_table_dirlisting.c">https://github.com/warmcat/libwebsockets/tree/master/plugins/generic-table/protocol_table_dirlisting.c</a></li>
+<li>Example HTML: <a href="https://github.com/warmcat/libwebsockets/tree/master/plugins/generic-table/assets/index.html">https://github.com/warmcat/libwebsockets/tree/master/plugins/generic-table/assets/index.html</a></li>
+<li>lwsgt.js (client-side table rendering / ws link management): <a href="https://github.com/warmcat/libwebsockets/tree/master/plugins/generic-table/assets/lwsgt.js">https://github.com/warmcat/libwebsockets/tree/master/plugins/generic-table/assets/lwsgt.js</a></li>
+</ul>
+<h1><a class="anchor" id="gteb"></a>
+Enabling for build</h1>
+<p>Enable the demo plugin at CMake with -DLWS_WITH_PLUGINS=1</p>
+<h1><a class="anchor" id="gtinth"></a>
+Integrating with your html</h1>
+<ul>
+<li>In your HEAD section, include lwsgt.js</li>
+</ul>
+<div class="fragment"><div class="line"><a name="l00001"></a><span class="lineno">    1</span>&#160;&lt;script src=&quot;lwsgt.js&quot;&gt;&lt;/script&gt;</div></div><!-- fragment --><ul>
+<li>Also in your HEAD section, style the lwsgt CSS, eg</li>
+</ul>
+<div class="fragment"><div class="line"><a name="l00001"></a><span class="lineno">    1</span>&#160;&lt;style&gt;</div><div class="line"><a name="l00002"></a><span class="lineno">    2</span>&#160;.lwsgt_title { font-size: 24; text-align:center }</div><div class="line"><a name="l00003"></a><span class="lineno">    3</span>&#160;.lwsgt_breadcrumbs { font-size: 18; text-align:left }</div><div class="line"><a name="l00004"></a><span class="lineno">    4</span>&#160;.lwsgt_table { font-size: 14; padding:12px; margin: 12px; align:center }</div><div class="line"><a name="l00005"></a><span class="lineno">    5</span>&#160;.lwsgt_hdr { font-size: 18; text-align:center;</div><div class="line"><a name="l00006"></a><span class="lineno">    6</span>&#160;             background-color: rgba(40, 40, 40, 0.8); color: white }</div><div class="line"><a name="l00007"></a><span class="lineno">    7</span>&#160;.lwsgt_tr { padding: 10px  }</div><div class="line"><a name="l00008"></a><span class="lineno">    8</span>&#160;.lwsgt_td { padding: 3px  }</div><div class="line"><a name="l00009"></a><span class="lineno">    9</span>&#160;&lt;/style&gt;</div></div><!-- fragment --><p>You can skip this but the result will be less beautiful until some CSS is provided.</p>
+<ul>
+<li>In your body section, declare a div with an id (can be whatever you want)</li>
+</ul>
+<div class="fragment"><div class="line"><a name="l00001"></a><span class="lineno">    1</span>&#160;&lt;tr&gt;&lt;td&gt;&lt;div id=&quot;lwsgt1&quot; class=&quot;group1&quot;&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;</div></div><!-- fragment --><p>lwsgt JS will put its content there.</p>
+<ul>
+<li>Finally in a &lt;script&gt; at the end of your page, instantiate lwsgt and provide a custom callback for clickable links</li>
+</ul>
+<div class="fragment"><div class="line"><a name="l00001"></a><span class="lineno">    1</span>&#160;&lt;script&gt;</div><div class="line"><a name="l00002"></a><span class="lineno">    2</span>&#160;var v1 = new lwsgt_initial(&quot;Dir listing demo&quot;,</div><div class="line"><a name="l00003"></a><span class="lineno">    3</span>&#160;                           &quot;protocol-lws-table-dirlisting&quot;,</div><div class="line"><a name="l00004"></a><span class="lineno">    4</span>&#160;                           &quot;lwsgt1&quot;, &quot;lwsgt_dir_click&quot;, &quot;v1&quot;);</div><div class="line"><a name="l00005"></a><span class="lineno">    5</span>&#160;</div><div class="line"><a name="l00006"></a><span class="lineno">    6</span>&#160;function lwsgt_dir_click(gt, u, col, row)</div><div class="line"><a name="l00007"></a><span class="lineno">    7</span>&#160;{</div><div class="line"><a name="l00008"></a><span class="lineno">    8</span>&#160;        if (u[0] == &#39;=&#39;) { /* change directory */</div><div class="line"><a name="l00009"></a><span class="lineno">    9</span>&#160;                window[gt].lwsgt_ws.send(u.substring(1, u.length));</div><div class="line"><a name="l00010"></a><span class="lineno">   10</span>&#160;                return;</div><div class="line"><a name="l00011"></a><span class="lineno">   11</span>&#160;        }</div><div class="line"><a name="l00012"></a><span class="lineno">   12</span>&#160;        var win = window.open(u, &#39;_blank&#39;);</div><div class="line"><a name="l00013"></a><span class="lineno">   13</span>&#160;        win.focus();</div><div class="line"><a name="l00014"></a><span class="lineno">   14</span>&#160;}</div><div class="line"><a name="l00015"></a><span class="lineno">   15</span>&#160;</div><div class="line"><a name="l00016"></a><span class="lineno">   16</span>&#160;&lt;/script&gt;</div></div><!-- fragment --><p>In the callback, you can recover the ws object by <code>window[gt].lwsgt_ws</code>.</p>
+<h1><a class="anchor" id="gtc"></a>
+Lwsgt constructor</h1>
+<p>To instantiate the ws link and lwsgt instance, your HTML must call a lwsgt constructor for each region on the page managed by lwsgt.</p>
+<p><code>var myvar = new lwsgt_initial(title, ws_protocol, div_id, click_cb, myvar);</code></p>
+<p>All of the arguments are strings.</p>
+<table class="doxtable">
+<tr>
+<th>Parameter </th><th>Description  </th></tr>
+<tr>
+<td>title </td><td>Title string to go above the table </td></tr>
+<tr>
+<td>ws_protocol </td><td>Protocol name string to use when making ws connection </td></tr>
+<tr>
+<td>div_id </td><td>HTML id of div to fill with content </td></tr>
+<tr>
+<td>click_cb </td><td>Callback function name string to handle clickable links </td></tr>
+<tr>
+<td>myvar </td><td>Name of var used to hold this instantiation globally </td></tr>
+</table>
+<p>Note "myvar" is needed so it can be passed to the click handling callback.</p>
+<h1><a class="anchor" id="gtclick"></a>
+Lwsgt click handling function</h1>
+<p>When a clickable link produced by lwsgt is clicked, the function named in the click_cb parameter to lwsgt_initial is called.</p>
+<p>That function is expected to take four parameters, eg</p>
+<p><code>function lwsgt_dir_click(gt, u, col, row)</code></p>
+<table class="doxtable">
+<tr>
+<th>Parameter </th><th>Description  </th></tr>
+<tr>
+<td>gt </td><td>Name of global var holding this lwsgt context (ie, myvar) </td></tr>
+<tr>
+<td>u </td><td>Link "url" string </td></tr>
+<tr>
+<td>col </td><td>Table column number link is from </td></tr>
+<tr>
+<td>row </td><td>Table row number link is from </td></tr>
+</table>
+<h1><a class="anchor" id="gtgj"></a>
+Generic-table JSON</h1>
+<h3>Column layout</h3>
+<p>When the ws connection is established, the protocol should send a JSON message describing the table columns. For example</p>
+<div class="fragment"><div class="line"><a name="l00001"></a><span class="lineno">    1</span>&#160;&quot;cols&quot;: [</div><div class="line"><a name="l00002"></a><span class="lineno">    2</span>&#160;      { &quot;name&quot;: &quot;Date&quot; },</div><div class="line"><a name="l00003"></a><span class="lineno">    3</span>&#160;      { &quot;name&quot;: &quot;Size&quot;, &quot;align&quot;: &quot;right&quot; },</div><div class="line"><a name="l00004"></a><span class="lineno">    4</span>&#160;      { &quot;name&quot;: &quot;Icon&quot; },</div><div class="line"><a name="l00005"></a><span class="lineno">    5</span>&#160;      { &quot;name&quot;: &quot;Name&quot;, &quot;href&quot;: &quot;uri&quot;},</div><div class="line"><a name="l00006"></a><span class="lineno">    6</span>&#160;      { &quot;name&quot;: &quot;uri&quot;, &quot;hide&quot;: &quot;1&quot; }</div><div class="line"><a name="l00007"></a><span class="lineno">    7</span>&#160;  ]</div><div class="line"><a name="l00008"></a><span class="lineno">    8</span>&#160;}</div></div><!-- fragment --><ul>
+<li>This describes 5 columns</li>
+<li>Only four columns (not "uri") should be visible</li>
+<li>"Name" should be presented as a clickable link using "uri" as the destination, when a "uri" field is presented.</li>
+<li>"Size" field should be presented aligned to the right</li>
+</ul>
+<h3>Breadcrumbs</h3>
+<p>When a view is hierarchical, it's useful to provide a "path" with links back in the "path", known as "breadcrumbs".</p>
+<p>Elements before the last one should provide a "url" member as well as the displayable name, which is used to create the link destination.</p>
+<p>The last element, being the current displayed page should not have a url member and be displayed without link style.</p>
+<div class="fragment"><div class="line"><a name="l00001"></a><span class="lineno">    1</span>&#160;&quot;breadcrumbs&quot;:[{&quot;name&quot;:&quot;top&quot;, &quot;url&quot;: &quot;/&quot; }, {&quot;name&quot;:&quot;mydir&quot;}]</div></div><!-- fragment --><h3>Table data</h3>
+<p>The actual file data consists of an array of rows, containing the columns mentioned in the original "cols" section.</p>
+<div class="fragment"><div class="line"><a name="l00001"></a><span class="lineno">    1</span>&#160;&quot;data&quot;:[</div><div class="line"><a name="l00002"></a><span class="lineno">    2</span>&#160;        {</div><div class="line"><a name="l00003"></a><span class="lineno">    3</span>&#160;         &quot;Icon&quot;:&quot; &quot;,</div><div class="line"><a name="l00004"></a><span class="lineno">    4</span>&#160;         &quot;Date&quot;:&quot;2015-Feb-06 03:08:35 +0000&quot;,</div><div class="line"><a name="l00005"></a><span class="lineno">    5</span>&#160;         &quot;Size&quot;:&quot;1406&quot;,</div><div class="line"><a name="l00006"></a><span class="lineno">    6</span>&#160;         &quot;uri&quot;:&quot;./serve//favicon.ico&quot;,</div><div class="line"><a name="l00007"></a><span class="lineno">    7</span>&#160;         &quot;Name&quot;:&quot;favicon.ico&quot;</div><div class="line"><a name="l00008"></a><span class="lineno">    8</span>&#160;        }</div><div class="line"><a name="l00009"></a><span class="lineno">    9</span>&#160;]</div></div><!-- fragment --><h1><a class="anchor" id="gtdirl"></a>
+Setting up protocol-lws-table-dirlisting</h1>
+<p>The example protocol needs two mounts, one to provide the index.html, js and the protocol itself</p>
+<div class="fragment"><div class="line"><a name="l00001"></a><span class="lineno">    1</span>&#160;{</div><div class="line"><a name="l00002"></a><span class="lineno">    2</span>&#160; &quot;mountpoint&quot;: &quot;/dirtest&quot;,</div><div class="line"><a name="l00003"></a><span class="lineno">    3</span>&#160; &quot;origin&quot;: &quot;file:///usr/share/libwebsockets-test-server/generic-table&quot;,</div><div class="line"><a name="l00004"></a><span class="lineno">    4</span>&#160; &quot;origin&quot;: &quot;callback://protocol-lws-table-dirlisting&quot;,</div><div class="line"><a name="l00005"></a><span class="lineno">    5</span>&#160; &quot;default&quot;: &quot;index.html&quot;,</div><div class="line"><a name="l00006"></a><span class="lineno">    6</span>&#160; &quot;pmo&quot;: [{</div><div class="line"><a name="l00007"></a><span class="lineno">    7</span>&#160;        &quot;dir&quot;: &quot;/usr/share/libwebsockets-test-server&quot;</div><div class="line"><a name="l00008"></a><span class="lineno">    8</span>&#160; }]</div><div class="line"><a name="l00009"></a><span class="lineno">    9</span>&#160;},</div></div><!-- fragment --><p>The protocol wants a per-mount option (PMO) to tell it the base directory it is serving from, named "dir".</p>
+<p>The other mount is there to simply serve items that get clicked on from the table in a secure way</p>
+<div class="fragment"><div class="line"><a name="l00001"></a><span class="lineno">    1</span>&#160;{</div><div class="line"><a name="l00002"></a><span class="lineno">    2</span>&#160; &quot;mountpoint&quot;: &quot;/dirtest/serve&quot;,</div><div class="line"><a name="l00003"></a><span class="lineno">    3</span>&#160; &quot;origin&quot;: &quot;file:///usr/share/libwebsockets-test-server&quot;,</div><div class="line"><a name="l00004"></a><span class="lineno">    4</span>&#160; &quot;default&quot;: &quot;index.html&quot;</div><div class="line"><a name="l00005"></a><span class="lineno">    5</span>&#160;},</div></div><!-- fragment --><p>This last bit is not related to using lwsgt itself. </p>
+</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>
index 85f779c..c46ef8a 100644 (file)
@@ -65,29 +65,40 @@ $(document).ready(function(){initNavTree('md_README.lwsws.html','');});
 <div class="title">Notes about lwsws </div>  </div>
 </div><!--header-->
 <div class="contents">
-<div class="textblock"><h2>Libwebsockets Web Server </h2>
+<div class="textblock"><h1><a class="anchor" id="lwsws"></a>
+Libwebsockets Web Server</h1>
 <p>lwsws is an implementation of a very lightweight, ws-capable generic web server, which uses libwebsockets to implement everything underneath.</p>
-<h2>Build </h2>
+<p>If you are basically implementing a standalone server with lws, you can avoid reinventing the wheel and use a debugged server including lws.</p>
+<h1><a class="anchor" id="lwswsb"></a>
+Build</h1>
 <p>Just enable -DLWS_WITH_LWSWS=1 at cmake-time.</p>
 <p>It enables libuv and plugin support automatically.</p>
-<h2>Configuration </h2>
-<p>lwsws uses JSON config files, they're pure JSON but # may be used to turn the rest of the line into a comment.</p>
-<p>There's also a single substitution, if a string contains "_lws_ddir_", then that is replaced with the LWS install data directory path, eg, "/usr/share" or whatever was set when LWS was built + installed. That lets you refer to installed paths without having to change the config if your install path was different.</p>
+<h1><a class="anchor" id="lwswsc"></a>
+Lwsws Configuration</h1>
+<p>lwsws uses JSON config files, they're pure JSON except:</p>
+<ul>
+<li>'#' may be used to turn the rest of the line into a comment.</li>
+<li>There's also a single substitution, if a string contains "_lws_ddir_", then that is replaced with the LWS install data directory path, eg, "/usr/share" or whatever was set when LWS was built + installed. That lets you refer to installed paths without having to change the config if your install path was different.</li>
+</ul>
 <p>There is a single file intended for global settings</p>
 <p>/etc/lwsws/conf </p><div class="fragment"><div class="line"><a name="l00001"></a><span class="lineno">    1</span>&#160;# these are the server global settings</div><div class="line"><a name="l00002"></a><span class="lineno">    2</span>&#160;# stuff related to vhosts should go in one</div><div class="line"><a name="l00003"></a><span class="lineno">    3</span>&#160;# file per vhost in ../conf.d/</div><div class="line"><a name="l00004"></a><span class="lineno">    4</span>&#160;</div><div class="line"><a name="l00005"></a><span class="lineno">    5</span>&#160;{</div><div class="line"><a name="l00006"></a><span class="lineno">    6</span>&#160;  &quot;global&quot;: {</div><div class="line"><a name="l00007"></a><span class="lineno">    7</span>&#160;   &quot;uid&quot;: &quot;48&quot;,  # apache user</div><div class="line"><a name="l00008"></a><span class="lineno">    8</span>&#160;   &quot;gid&quot;: &quot;48&quot;,  # apache user</div><div class="line"><a name="l00009"></a><span class="lineno">    9</span>&#160;   &quot;count-threads&quot;: &quot;1&quot;,</div><div class="line"><a name="l00010"></a><span class="lineno">   10</span>&#160;   &quot;server-string&quot;: &quot;myserver v1&quot;, # returned in http headers</div><div class="line"><a name="l00011"></a><span class="lineno">   11</span>&#160;   &quot;init-ssl&quot;: &quot;yes&quot;</div><div class="line"><a name="l00012"></a><span class="lineno">   12</span>&#160; }</div><div class="line"><a name="l00013"></a><span class="lineno">   13</span>&#160;}</div></div><!-- fragment --><p> and a config directory intended to take one file per vhost</p>
-<p>/etc/lwsws/conf.d/warmcat.com </p><div class="fragment"><div class="line"><a name="l00001"></a><span class="lineno">    1</span>&#160;{</div><div class="line"><a name="l00002"></a><span class="lineno">    2</span>&#160;        &quot;vhosts&quot;: [{</div><div class="line"><a name="l00003"></a><span class="lineno">    3</span>&#160;                &quot;name&quot;: &quot;warmcat.com&quot;,</div><div class="line"><a name="l00004"></a><span class="lineno">    4</span>&#160;                &quot;port&quot;: &quot;443&quot;,</div><div class="line"><a name="l00005"></a><span class="lineno">    5</span>&#160;                &quot;interface&quot;: &quot;eth0&quot;,  # optional</div><div class="line"><a name="l00006"></a><span class="lineno">    6</span>&#160;                &quot;host-ssl-key&quot;: &quot;/etc/pki/tls/private/warmcat.com.key&quot;,  # if given enable ssl</div><div class="line"><a name="l00007"></a><span class="lineno">    7</span>&#160;                &quot;host-ssl-cert&quot;: &quot;/etc/pki/tls/certs/warmcat.com.crt&quot;,</div><div class="line"><a name="l00008"></a><span class="lineno">    8</span>&#160;                &quot;host-ssl-ca&quot;: &quot;/etc/pki/tls/certs/warmcat.com.cer&quot;,</div><div class="line"><a name="l00009"></a><span class="lineno">    9</span>&#160;                &quot;mounts&quot;: [{  # autoserve</div><div class="line"><a name="l00010"></a><span class="lineno">   10</span>&#160;                        &quot;mountpoint&quot;: &quot;/&quot;,</div><div class="line"><a name="l00011"></a><span class="lineno">   11</span>&#160;                        &quot;origin&quot;: &quot;file:///var/www/warmcat.com&quot;,</div><div class="line"><a name="l00012"></a><span class="lineno">   12</span>&#160;                        &quot;default&quot;: &quot;index.html&quot;</div><div class="line"><a name="l00013"></a><span class="lineno">   13</span>&#160;                }]</div><div class="line"><a name="l00014"></a><span class="lineno">   14</span>&#160;        }]</div><div class="line"><a name="l00015"></a><span class="lineno">   15</span>&#160;}</div></div><!-- fragment --><p> To get started quickly, an example config reproducing the old test server on port 7681, non-SSL is provided. To set it up </p><div class="fragment"><div class="line"><a name="l00001"></a><span class="lineno">    1</span>&#160;# mkdir -p /etc/lwsws/conf.d /var/log/lwsws</div><div class="line"><a name="l00002"></a><span class="lineno">    2</span>&#160;# cp ./lwsws/etc-lwsws-conf-EXAMPLE /etc/lwsws/conf</div><div class="line"><a name="l00003"></a><span class="lineno">    3</span>&#160;# cp ./lwsws/etc-lwsws-conf.d-localhost-EXAMPLE /etc/lwsws/conf.d/test-server</div><div class="line"><a name="l00004"></a><span class="lineno">    4</span>&#160;# sudo lwsws</div></div><!-- fragment --> <h2>Vhosts </h2>
+<p>/etc/lwsws/conf.d/warmcat.com </p><div class="fragment"><div class="line"><a name="l00001"></a><span class="lineno">    1</span>&#160;{</div><div class="line"><a name="l00002"></a><span class="lineno">    2</span>&#160;        &quot;vhosts&quot;: [{</div><div class="line"><a name="l00003"></a><span class="lineno">    3</span>&#160;                &quot;name&quot;: &quot;warmcat.com&quot;,</div><div class="line"><a name="l00004"></a><span class="lineno">    4</span>&#160;                &quot;port&quot;: &quot;443&quot;,</div><div class="line"><a name="l00005"></a><span class="lineno">    5</span>&#160;                &quot;interface&quot;: &quot;eth0&quot;,  # optional</div><div class="line"><a name="l00006"></a><span class="lineno">    6</span>&#160;                &quot;host-ssl-key&quot;: &quot;/etc/pki/tls/private/warmcat.com.key&quot;,  # if given enable ssl</div><div class="line"><a name="l00007"></a><span class="lineno">    7</span>&#160;                &quot;host-ssl-cert&quot;: &quot;/etc/pki/tls/certs/warmcat.com.crt&quot;,</div><div class="line"><a name="l00008"></a><span class="lineno">    8</span>&#160;                &quot;host-ssl-ca&quot;: &quot;/etc/pki/tls/certs/warmcat.com.cer&quot;,</div><div class="line"><a name="l00009"></a><span class="lineno">    9</span>&#160;                &quot;mounts&quot;: [{  # autoserve</div><div class="line"><a name="l00010"></a><span class="lineno">   10</span>&#160;                        &quot;mountpoint&quot;: &quot;/&quot;,</div><div class="line"><a name="l00011"></a><span class="lineno">   11</span>&#160;                        &quot;origin&quot;: &quot;file:///var/www/warmcat.com&quot;,</div><div class="line"><a name="l00012"></a><span class="lineno">   12</span>&#160;                        &quot;default&quot;: &quot;index.html&quot;</div><div class="line"><a name="l00013"></a><span class="lineno">   13</span>&#160;                }]</div><div class="line"><a name="l00014"></a><span class="lineno">   14</span>&#160;        }]</div><div class="line"><a name="l00015"></a><span class="lineno">   15</span>&#160;}</div></div><!-- fragment --><p> To get started quickly, an example config reproducing the old test server on port 7681, non-SSL is provided. To set it up </p><div class="fragment"><div class="line"><a name="l00001"></a><span class="lineno">    1</span>&#160;# mkdir -p /etc/lwsws/conf.d /var/log/lwsws</div><div class="line"><a name="l00002"></a><span class="lineno">    2</span>&#160;# cp ./lwsws/etc-lwsws-conf-EXAMPLE /etc/lwsws/conf</div><div class="line"><a name="l00003"></a><span class="lineno">    3</span>&#160;# cp ./lwsws/etc-lwsws-conf.d-localhost-EXAMPLE /etc/lwsws/conf.d/test-server</div><div class="line"><a name="l00004"></a><span class="lineno">    4</span>&#160;# sudo lwsws</div></div><!-- fragment --><h1><a class="anchor" id="lwswsv"></a>
+Lwsws Vhosts</h1>
 <p>One server can run many vhosts, where SSL is in use SNI is used to match the connection to a vhost and its vhost-specific SSL keys during SSL negotiation.</p>
 <p>Listing multiple vhosts looks something like this </p><div class="fragment"><div class="line"><a name="l00001"></a><span class="lineno">    1</span>&#160;{</div><div class="line"><a name="l00002"></a><span class="lineno">    2</span>&#160; &quot;vhosts&quot;: [ {</div><div class="line"><a name="l00003"></a><span class="lineno">    3</span>&#160;     &quot;name&quot;: &quot;localhost&quot;,</div><div class="line"><a name="l00004"></a><span class="lineno">    4</span>&#160;     &quot;port&quot;: &quot;443&quot;,</div><div class="line"><a name="l00005"></a><span class="lineno">    5</span>&#160;     &quot;host-ssl-key&quot;:  &quot;/etc/pki/tls/private/libwebsockets.org.key&quot;,</div><div class="line"><a name="l00006"></a><span class="lineno">    6</span>&#160;     &quot;host-ssl-cert&quot;: &quot;/etc/pki/tls/certs/libwebsockets.org.crt&quot;,</div><div class="line"><a name="l00007"></a><span class="lineno">    7</span>&#160;     &quot;host-ssl-ca&quot;:   &quot;/etc/pki/tls/certs/libwebsockets.org.cer&quot;,</div><div class="line"><a name="l00008"></a><span class="lineno">    8</span>&#160;     &quot;mounts&quot;: [{</div><div class="line"><a name="l00009"></a><span class="lineno">    9</span>&#160;       &quot;mountpoint&quot;: &quot;/&quot;,</div><div class="line"><a name="l00010"></a><span class="lineno">   10</span>&#160;       &quot;origin&quot;: &quot;file:///var/www/libwebsockets.org&quot;,</div><div class="line"><a name="l00011"></a><span class="lineno">   11</span>&#160;       &quot;default&quot;: &quot;index.html&quot;</div><div class="line"><a name="l00012"></a><span class="lineno">   12</span>&#160;       }, {</div><div class="line"><a name="l00013"></a><span class="lineno">   13</span>&#160;        &quot;mountpoint&quot;: &quot;/testserver&quot;,</div><div class="line"><a name="l00014"></a><span class="lineno">   14</span>&#160;        &quot;origin&quot;: &quot;file:///usr/local/share/libwebsockets-test-server&quot;,</div><div class="line"><a name="l00015"></a><span class="lineno">   15</span>&#160;        &quot;default&quot;: &quot;test.html&quot;</div><div class="line"><a name="l00016"></a><span class="lineno">   16</span>&#160;       }],</div><div class="line"><a name="l00017"></a><span class="lineno">   17</span>&#160;     # which protocols are enabled for this vhost, and optional</div><div class="line"><a name="l00018"></a><span class="lineno">   18</span>&#160;     # vhost-specific config options for the protocol</div><div class="line"><a name="l00019"></a><span class="lineno">   19</span>&#160;     #</div><div class="line"><a name="l00020"></a><span class="lineno">   20</span>&#160;     &quot;ws-protocols&quot;: [{</div><div class="line"><a name="l00021"></a><span class="lineno">   21</span>&#160;       &quot;warmcat,timezoom&quot;: {</div><div class="line"><a name="l00022"></a><span class="lineno">   22</span>&#160;         &quot;status&quot;: &quot;ok&quot;</div><div class="line"><a name="l00023"></a><span class="lineno">   23</span>&#160;       }</div><div class="line"><a name="l00024"></a><span class="lineno">   24</span>&#160;     }]</div><div class="line"><a name="l00025"></a><span class="lineno">   25</span>&#160;    },</div><div class="line"><a name="l00026"></a><span class="lineno">   26</span>&#160;    {</div><div class="line"><a name="l00027"></a><span class="lineno">   27</span>&#160;    &quot;name&quot;: &quot;localhost&quot;,</div><div class="line"><a name="l00028"></a><span class="lineno">   28</span>&#160;    &quot;port&quot;: &quot;7681&quot;,</div><div class="line"><a name="l00029"></a><span class="lineno">   29</span>&#160;     &quot;host-ssl-key&quot;:  &quot;/etc/pki/tls/private/libwebsockets.org.key&quot;,</div><div class="line"><a name="l00030"></a><span class="lineno">   30</span>&#160;     &quot;host-ssl-cert&quot;: &quot;/etc/pki/tls/certs/libwebsockets.org.crt&quot;,</div><div class="line"><a name="l00031"></a><span class="lineno">   31</span>&#160;     &quot;host-ssl-ca&quot;:   &quot;/etc/pki/tls/certs/libwebsockets.org.cer&quot;,</div><div class="line"><a name="l00032"></a><span class="lineno">   32</span>&#160;     &quot;mounts&quot;: [{</div><div class="line"><a name="l00033"></a><span class="lineno">   33</span>&#160;       &quot;mountpoint&quot;: &quot;/&quot;,</div><div class="line"><a name="l00034"></a><span class="lineno">   34</span>&#160;       &quot;origin&quot;: &quot;&gt;https://localhost&quot;</div><div class="line"><a name="l00035"></a><span class="lineno">   35</span>&#160;     }]</div><div class="line"><a name="l00036"></a><span class="lineno">   36</span>&#160;   },</div><div class="line"><a name="l00037"></a><span class="lineno">   37</span>&#160;    {</div><div class="line"><a name="l00038"></a><span class="lineno">   38</span>&#160;    &quot;name&quot;: &quot;localhost&quot;,</div><div class="line"><a name="l00039"></a><span class="lineno">   39</span>&#160;    &quot;port&quot;: &quot;80&quot;,</div><div class="line"><a name="l00040"></a><span class="lineno">   40</span>&#160;     &quot;mounts&quot;: [{</div><div class="line"><a name="l00041"></a><span class="lineno">   41</span>&#160;       &quot;mountpoint&quot;: &quot;/&quot;,</div><div class="line"><a name="l00042"></a><span class="lineno">   42</span>&#160;       &quot;origin&quot;: &quot;&gt;https://localhost&quot;</div><div class="line"><a name="l00043"></a><span class="lineno">   43</span>&#160;     }]</div><div class="line"><a name="l00044"></a><span class="lineno">   44</span>&#160;   }</div><div class="line"><a name="l00045"></a><span class="lineno">   45</span>&#160;</div><div class="line"><a name="l00046"></a><span class="lineno">   46</span>&#160;  ]</div><div class="line"><a name="l00047"></a><span class="lineno">   47</span>&#160;}</div></div><!-- fragment --><p>That sets up three vhosts all called "localhost" on ports 443 and 7681 with SSL, and port 80 without SSL but with a forced redirect to <a href="https://localhost">https://localhost</a></p>
-<h2>Vhost name and port </h2>
+<h1><a class="anchor" id="lwswsvn"></a>
+Lwsws Vhost name and port sharing</h1>
 <p>The vhost name field is used to match on incoming SNI or Host: header, so it must always be the host name used to reach the vhost externally.</p>
 <ul>
 <li>Vhosts may have the same name and different ports, these will each create a listening socket on the appropriate port.</li>
 <li>Vhosts may also have the same port and different name: these will be treated as true vhosts on one listening socket and the active vhost decided at SSL negotiation time (via SNI) or if no SSL, then after the Host: header from the client has been parsed.</li>
 </ul>
-<h2>Protocols </h2>
+<h1><a class="anchor" id="lwswspr"></a>
+Lwsws Protocols</h1>
 <p>Vhosts by default have available the union of any initial protocols from context creation time, and any protocols exposed by plugins.</p>
 <p>Vhosts can select which plugins they want to offer and give them per-vhost settings using this syntax </p><div class="fragment"><div class="line"><a name="l00001"></a><span class="lineno">    1</span>&#160;&quot;ws-protocols&quot;: [{</div><div class="line"><a name="l00002"></a><span class="lineno">    2</span>&#160;  &quot;warmcat-timezoom&quot;: {</div><div class="line"><a name="l00003"></a><span class="lineno">    3</span>&#160;    &quot;status&quot;: &quot;ok&quot;</div><div class="line"><a name="l00004"></a><span class="lineno">    4</span>&#160;  }</div><div class="line"><a name="l00005"></a><span class="lineno">    5</span>&#160;}]</div></div><!-- fragment --><p>The "x":"y" parameters like "status":"ok" are made available to the protocol during its per-vhost LWS_CALLBACK_PROTOCOL_INIT ( is a pointer to a linked list of struct <a class="el" href="structlws__protocol__vhost__options.html">lws_protocol_vhost_options</a> containing the name and value pointers).</p>
-<p>To indicate that a protocol should be used when no Protocol: header is sent by the client, you can use "default": "1" </p><div class="fragment"><div class="line"><a name="l00001"></a><span class="lineno">    1</span>&#160;&quot;ws-protocols&quot;: [{</div><div class="line"><a name="l00002"></a><span class="lineno">    2</span>&#160;  &quot;warmcat-timezoom&quot;: {</div><div class="line"><a name="l00003"></a><span class="lineno">    3</span>&#160;    &quot;status&quot;: &quot;ok&quot;,</div><div class="line"><a name="l00004"></a><span class="lineno">    4</span>&#160;    &quot;default&quot;: &quot;1&quot;</div><div class="line"><a name="l00005"></a><span class="lineno">    5</span>&#160;  }</div><div class="line"><a name="l00006"></a><span class="lineno">    6</span>&#160;}]</div></div><!-- fragment --><h2>Other vhost options </h2>
+<p>To indicate that a protocol should be used when no Protocol: header is sent by the client, you can use "default": "1" </p><div class="fragment"><div class="line"><a name="l00001"></a><span class="lineno">    1</span>&#160;&quot;ws-protocols&quot;: [{</div><div class="line"><a name="l00002"></a><span class="lineno">    2</span>&#160;  &quot;warmcat-timezoom&quot;: {</div><div class="line"><a name="l00003"></a><span class="lineno">    3</span>&#160;    &quot;status&quot;: &quot;ok&quot;,</div><div class="line"><a name="l00004"></a><span class="lineno">    4</span>&#160;    &quot;default&quot;: &quot;1&quot;</div><div class="line"><a name="l00005"></a><span class="lineno">    5</span>&#160;  }</div><div class="line"><a name="l00006"></a><span class="lineno">    6</span>&#160;}]</div></div><!-- fragment --><h1><a class="anchor" id="lwswsovo"></a>
+Lwsws Other vhost options</h1>
 <ul>
 <li>If the three options <code>host-ssl-cert</code>, <code>host-ssl-ca</code> and <code>host-ssl-key</code> are given, then the vhost supports SSL.</li>
 </ul>
@@ -112,7 +123,8 @@ $(document).ready(function(){initNavTree('md_README.lwsws.html','');});
 <div class="fragment"><div class="line"><a name="l00001"></a><span class="lineno">    1</span>&#160;&quot;`ssl-option-set`&quot;: &quot;268435456&quot;</div></div><!-- fragment --><ul>
 <li>"`ssl-option-clear'": "&lt;decimal&gt;" Clears the SSL option flag value for the vhost. It may be used multiple times and OR's the flags together.</li>
 </ul>
-<h2>Mounts </h2>
+<h1><a class="anchor" id="lwswsm"></a>
+Lwsws Mounts</h1>
 <p>Where mounts are given in the vhost definition, then directory contents may be auto-served if it matches the mountpoint.</p>
 <p>Mount protocols are used to control what kind of translation happens</p>
 <ul>
@@ -123,7 +135,8 @@ $(document).ready(function(){initNavTree('md_README.lwsws.html','');});
 <li>^http:// or ^https:// these cause any url matching the mountpoint to issue a redirect to the origin url</li>
 <li>cgi:// this causes any matching url to be given to the named cgi, eg <div class="fragment"><div class="line"><a name="l00001"></a><span class="lineno">    1</span>&#160;{</div><div class="line"><a name="l00002"></a><span class="lineno">    2</span>&#160; &quot;mountpoint&quot;: &quot;/git&quot;,</div><div class="line"><a name="l00003"></a><span class="lineno">    3</span>&#160; &quot;origin&quot;: &quot;cgi:///var/www/cgi-bin/cgit&quot;,</div><div class="line"><a name="l00004"></a><span class="lineno">    4</span>&#160; &quot;default&quot;: &quot;/&quot;</div><div class="line"><a name="l00005"></a><span class="lineno">    5</span>&#160;}, {</div><div class="line"><a name="l00006"></a><span class="lineno">    6</span>&#160; &quot;mountpoint&quot;: &quot;/cgit-data&quot;,</div><div class="line"><a name="l00007"></a><span class="lineno">    7</span>&#160; &quot;origin&quot;: &quot;file:///usr/share/cgit&quot;,</div><div class="line"><a name="l00008"></a><span class="lineno">    8</span>&#160; &quot;default&quot;: &quot;/&quot;</div><div class="line"><a name="l00009"></a><span class="lineno">    9</span>&#160;},</div></div><!-- fragment --> would cause the url /git/myrepo to pass "myrepo" to the cgi /var/www/cgi-bin/cgit and send the results to the client.</li>
 </ul>
-<h2>Other mount options </h2>
+<h1><a class="anchor" id="lwswsomo"></a>
+Lwsws Other mount options</h1>
 <p>1) Some protocols may want "per-mount options" in name:value format. You can provide them using "pmo" </p><pre class="fragment">           {
             "mountpoint": "/stuff",
             "origin": "callback://myprotocol",
@@ -135,7 +148,8 @@ $(document).ready(function(){initNavTree('md_README.lwsws.html','');});
 <p>3) It's also possible to set the cgi timeout (in secs) per cgi:// mount, like this </p><div class="fragment"><div class="line"><a name="l00001"></a><span class="lineno">    1</span>&#160;&quot;cgi-timeout&quot;: &quot;30&quot;</div></div><!-- fragment --><p> 4) <code>callback://</code> protocol may be used when defining a mount to associate a named protocol callback with the URL namespace area. For example </p><div class="fragment"><div class="line"><a name="l00001"></a><span class="lineno">    1</span>&#160;{</div><div class="line"><a name="l00002"></a><span class="lineno">    2</span>&#160; &quot;mountpoint&quot;: &quot;/formtest&quot;,</div><div class="line"><a name="l00003"></a><span class="lineno">    3</span>&#160; &quot;origin&quot;: &quot;callback://protocol-post-demo&quot;</div><div class="line"><a name="l00004"></a><span class="lineno">    4</span>&#160;}</div></div><!-- fragment --><p> All handling of client access to /formtest[anything] will be passed to the callback registered to the protocol "protocol-post-demo".</p>
 <p>This is useful for handling POST http body content or general non-cgi http payload generation inside a plugin.</p>
 <p>See the related notes in README.coding.md</p>
-<p>5) Cache policy of the files in the mount can also be set. If no options are given, the content is marked uncacheable. </p><div class="fragment"><div class="line"><a name="l00001"></a><span class="lineno">    1</span>&#160;{</div><div class="line"><a name="l00002"></a><span class="lineno">    2</span>&#160; &quot;mountpoint&quot;: &quot;/&quot;,</div><div class="line"><a name="l00003"></a><span class="lineno">    3</span>&#160; &quot;origin&quot;: &quot;file:///var/www/mysite.com&quot;,</div><div class="line"><a name="l00004"></a><span class="lineno">    4</span>&#160; &quot;cache-max-age&quot;: &quot;60&quot;,      # seconds</div><div class="line"><a name="l00005"></a><span class="lineno">    5</span>&#160; &quot;cache-reuse&quot;: &quot;1&quot;,         # allow reuse at client at all</div><div class="line"><a name="l00006"></a><span class="lineno">    6</span>&#160; &quot;cache-revalidate&quot;: &quot;1&quot;,    # check it with server each time</div><div class="line"><a name="l00007"></a><span class="lineno">    7</span>&#160; &quot;cache-intermediaries&quot;: &quot;1&quot; # allow intermediary caches to hold</div><div class="line"><a name="l00008"></a><span class="lineno">    8</span>&#160;}</div></div><!-- fragment --><p>6) You can also define a list of additional mimetypes per-mount </p><div class="fragment"><div class="line"><a name="l00001"></a><span class="lineno">    1</span>&#160;&quot;extra-mimetypes&quot;: {</div><div class="line"><a name="l00002"></a><span class="lineno">    2</span>&#160;         &quot;.zip&quot;: &quot;application/zip&quot;,</div><div class="line"><a name="l00003"></a><span class="lineno">    3</span>&#160;         &quot;.doc&quot;: &quot;text/evil&quot;</div><div class="line"><a name="l00004"></a><span class="lineno">    4</span>&#160; }</div></div><!-- fragment --><h2>Plugins </h2>
+<p>5) Cache policy of the files in the mount can also be set. If no options are given, the content is marked uncacheable. </p><div class="fragment"><div class="line"><a name="l00001"></a><span class="lineno">    1</span>&#160;{</div><div class="line"><a name="l00002"></a><span class="lineno">    2</span>&#160; &quot;mountpoint&quot;: &quot;/&quot;,</div><div class="line"><a name="l00003"></a><span class="lineno">    3</span>&#160; &quot;origin&quot;: &quot;file:///var/www/mysite.com&quot;,</div><div class="line"><a name="l00004"></a><span class="lineno">    4</span>&#160; &quot;cache-max-age&quot;: &quot;60&quot;,      # seconds</div><div class="line"><a name="l00005"></a><span class="lineno">    5</span>&#160; &quot;cache-reuse&quot;: &quot;1&quot;,         # allow reuse at client at all</div><div class="line"><a name="l00006"></a><span class="lineno">    6</span>&#160; &quot;cache-revalidate&quot;: &quot;1&quot;,    # check it with server each time</div><div class="line"><a name="l00007"></a><span class="lineno">    7</span>&#160; &quot;cache-intermediaries&quot;: &quot;1&quot; # allow intermediary caches to hold</div><div class="line"><a name="l00008"></a><span class="lineno">    8</span>&#160;}</div></div><!-- fragment --><p>6) You can also define a list of additional mimetypes per-mount </p><div class="fragment"><div class="line"><a name="l00001"></a><span class="lineno">    1</span>&#160;&quot;extra-mimetypes&quot;: {</div><div class="line"><a name="l00002"></a><span class="lineno">    2</span>&#160;         &quot;.zip&quot;: &quot;application/zip&quot;,</div><div class="line"><a name="l00003"></a><span class="lineno">    3</span>&#160;         &quot;.doc&quot;: &quot;text/evil&quot;</div><div class="line"><a name="l00004"></a><span class="lineno">    4</span>&#160; }</div></div><!-- fragment --><h1><a class="anchor" id="lwswspl"></a>
+Lwsws Plugins</h1>
 <p>Protcols and extensions may also be provided from "plugins", these are lightweight dynamic libraries. They are scanned for at init time, and any protocols and extensions found are added to the list given at context creation time.</p>
 <p>Protocols receive init (LWS_CALLBACK_PROTOCOL_INIT) and destruction (LWS_CALLBACK_PROTOCOL_DESTROY) callbacks per-vhost, and there are arrangements they can make per-vhost allocations and get hold of the correct pointer from the wsi at the callback.</p>
 <p>This allows a protocol to choose to strictly segregate data on a per-vhost basis, and also allows the plugin to handle its own initialization and context storage.</p>
@@ -148,14 +162,18 @@ $(document).ready(function(){initNavTree('md_README.lwsws.html','');});
 <li>lws_protocol_vh_priv_get(vhost, protocol)</li>
 </ul>
 <p>dumb increment, mirror and status protocol plugins are provided as examples.</p>
-<h2>Additional plugin search paths </h2>
-<p>Packages that have their own lws plugins can install them in their own preferred dir and ask lwsws to scan there by using a config fragment like this, in its own conf.d/ file managed by the other package </p><div class="fragment"><div class="line"><a name="l00001"></a><span class="lineno">    1</span>&#160;{</div><div class="line"><a name="l00002"></a><span class="lineno">    2</span>&#160;  &quot;global&quot;: {</div><div class="line"><a name="l00003"></a><span class="lineno">    3</span>&#160;   &quot;plugin-dir&quot;: &quot;/usr/local/share/coherent-timeline/plugins&quot;</div><div class="line"><a name="l00004"></a><span class="lineno">    4</span>&#160;  }</div><div class="line"><a name="l00005"></a><span class="lineno">    5</span>&#160;}</div></div><!-- fragment --><h2>lws-server-status plugin </h2>
+<h1><a class="anchor" id="lwswsplaplp"></a>
+Additional plugin search paths</h1>
+<p>Packages that have their own lws plugins can install them in their own preferred dir and ask lwsws to scan there by using a config fragment like this, in its own conf.d/ file managed by the other package </p><div class="fragment"><div class="line"><a name="l00001"></a><span class="lineno">    1</span>&#160;{</div><div class="line"><a name="l00002"></a><span class="lineno">    2</span>&#160;  &quot;global&quot;: {</div><div class="line"><a name="l00003"></a><span class="lineno">    3</span>&#160;   &quot;plugin-dir&quot;: &quot;/usr/local/share/coherent-timeline/plugins&quot;</div><div class="line"><a name="l00004"></a><span class="lineno">    4</span>&#160;  }</div><div class="line"><a name="l00005"></a><span class="lineno">    5</span>&#160;}</div></div><!-- fragment --><h1><a class="anchor" id="lwswsssp"></a>
+lws-server-status plugin</h1>
 <p>One provided protocol can be used to monitor the server status.</p>
 <p>Enable the protocol like this on a vhost's ws-protocols section </p><div class="fragment"><div class="line"><a name="l00001"></a><span class="lineno">    1</span>&#160;&quot;lws-server-status&quot;: {</div><div class="line"><a name="l00002"></a><span class="lineno">    2</span>&#160;  &quot;status&quot;: &quot;ok&quot;,</div><div class="line"><a name="l00003"></a><span class="lineno">    3</span>&#160;  &quot;update-ms&quot;: &quot;5000&quot;</div><div class="line"><a name="l00004"></a><span class="lineno">    4</span>&#160;}</div></div><!-- fragment --><p> "update-ms" is used to control how often updated JSON is sent on a ws link.</p>
 <p>And map the provided HTML into the vhost in the mounts section </p><div class="fragment"><div class="line"><a name="l00001"></a><span class="lineno">    1</span>&#160;{</div><div class="line"><a name="l00002"></a><span class="lineno">    2</span>&#160; &quot;mountpoint&quot;: &quot;/server-status&quot;,</div><div class="line"><a name="l00003"></a><span class="lineno">    3</span>&#160; &quot;origin&quot;: &quot;file:///usr/local/share/libwebsockets-test-server/server-status&quot;,</div><div class="line"><a name="l00004"></a><span class="lineno">    4</span>&#160; &quot;default&quot;: &quot;server-status.html&quot;</div><div class="line"><a name="l00005"></a><span class="lineno">    5</span>&#160;}</div></div><!-- fragment --><p> You might choose to put it on its own vhost which has "interface": "lo", so it's not externally visible.</p>
-<h2>Integration with Systemd </h2>
+<h1><a class="anchor" id="lwswssysd"></a>
+Lwsws Integration with Systemd</h1>
 <p>lwsws needs a service file like this as <code>/usr/lib/systemd/system/lwsws.service</code> </p><div class="fragment"><div class="line"><a name="l00001"></a><span class="lineno">    1</span>&#160;[Unit]</div><div class="line"><a name="l00002"></a><span class="lineno">    2</span>&#160;Description=Libwebsockets Web Server</div><div class="line"><a name="l00003"></a><span class="lineno">    3</span>&#160;After=syslog.target</div><div class="line"><a name="l00004"></a><span class="lineno">    4</span>&#160;</div><div class="line"><a name="l00005"></a><span class="lineno">    5</span>&#160;[Service]</div><div class="line"><a name="l00006"></a><span class="lineno">    6</span>&#160;ExecStart=/usr/local/bin/lwsws</div><div class="line"><a name="l00007"></a><span class="lineno">    7</span>&#160;StandardError=null</div><div class="line"><a name="l00008"></a><span class="lineno">    8</span>&#160;</div><div class="line"><a name="l00009"></a><span class="lineno">    9</span>&#160;[Install]</div><div class="line"><a name="l00010"></a><span class="lineno">   10</span>&#160;WantedBy=multi-user.target</div></div><!-- fragment --><p>You can find this prepared in <code>./lwsws/usr-lib-systemd-system-lwsws.service</code></p>
-<h2>Integration with logrotate </h2>
+<h1><a class="anchor" id="lwswslr"></a>
+Lwsws Integration with logrotate</h1>
 <p>For correct operation with logrotate, <code>/etc/logrotate.d/lwsws</code> (if that's where we're putting the logs) should contain </p><div class="fragment"><div class="line"><a name="l00001"></a><span class="lineno">    1</span>&#160;/var/log/lwsws/*log {</div><div class="line"><a name="l00002"></a><span class="lineno">    2</span>&#160;    copytruncate</div><div class="line"><a name="l00003"></a><span class="lineno">    3</span>&#160;    missingok</div><div class="line"><a name="l00004"></a><span class="lineno">    4</span>&#160;    notifempty</div><div class="line"><a name="l00005"></a><span class="lineno">    5</span>&#160;    delaycompress</div><div class="line"><a name="l00006"></a><span class="lineno">    6</span>&#160;}</div></div><!-- fragment --><p> You can find this prepared in <code>/lwsws/etc-logrotate.d-lwsws</code></p>
 <p>Prepare the log directory like this</p>
 <div class="fragment"><div class="line"><a name="l00001"></a><span class="lineno">    1</span>&#160;sudo mkdir /var/log/lwsws</div><div class="line"><a name="l00002"></a><span class="lineno">    2</span>&#160;sudo chmod 700 /var/log/lwsws</div></div><!-- fragment --> </div></div><!-- contents -->
index 4039ae1..ebf0439 100644 (file)
@@ -82,47 +82,58 @@ $(document).ready(function(){initNavTree('md_README.test-apps.html','');});
 <p>This is the original way lws implemented servers, plugins and libuv are not required, but without plugins separating the protocol code directly, the combined code is all squidged together and is much less maintainable.</p>
 <p>This method is still supported in lws but all ongoing and future work is being done in protocol plugins only.</p>
 <h1>Notes about lws test apps </h1>
-<h2>Testing server with a browser </h2>
+<h1><a class="anchor" id="tsb"></a>
+Testing server with a browser</h1>
 <p>If you run <a href="test-server/test-server.c">libwebsockets-test-server</a> and point your browser (eg, Chrome) to </p><pre class="fragment">    http://127.0.0.1:7681
 </pre><p>It will fetch a script in the form of <code>test.html</code>, and then run the script in there on the browser to open a websocket connection. Incrementing numbers should appear in the browser display.</p>
 <p>By default the test server logs to both stderr and syslog, you can control what is logged using <code>-d &lt;log level&gt;</code>, see later.</p>
-<h2>Running test server as a Daemon </h2>
+<h1><a class="anchor" id="tsd"></a>
+Running test server as a Daemon</h1>
 <p>You can use the -D option on the test server to have it fork into the background and return immediately. In this daemonized mode all stderr is disabled and logging goes only to syslog, eg, <code>/var/log/messages</code> or similar.</p>
 <p>The server maintains a lockfile at <code>/tmp/.lwsts-lock</code> that contains the pid of the master process, and deletes this file when the master process terminates.</p>
 <p>To stop the daemon, do </p><div class="fragment"><div class="line"><a name="l00001"></a><span class="lineno">    1</span>&#160;$ kill cat /tmp/.lwsts-lock </div></div><!-- fragment --><p> If it finds a stale lock (the pid mentioned in the file does not exist any more) it will delete the lock and create a new one during startup.</p>
 <p>If the lock is valid, the daemon will exit with a note on stderr that it was already running.</p>
-<h2>Using SSL on the server side </h2>
+<h1><a class="anchor" id="sssl"></a>
+Using SSL on the server side</h1>
 <p>To test it using SSL/WSS, just run the test server with </p><div class="fragment"><div class="line"><a name="l00001"></a><span class="lineno">    1</span>&#160;$ libwebsockets-test-server --ssl</div></div><!-- fragment --><p> and use the URL </p><div class="fragment"><div class="line"><a name="l00001"></a><span class="lineno">    1</span>&#160;https://127.0.0.1:7681</div></div><!-- fragment --><p> The connection will be entirely encrypted using some generated certificates that your browser will not accept, since they are not signed by any real Certificate Authority. Just accept the certificates in the browser and the connection will proceed in first https and then websocket wss, acting exactly the same.</p>
 <p><a href="test-server/test-server.c">test-server.c</a> is all that is needed to use libwebsockets for serving both the script html over http and websockets.</p>
-<h2>Testing websocket client support </h2>
+<h1><a class="anchor" id="wscl"></a>
+Testing websocket client support</h1>
 <p>If you run the test server as described above, you can also connect to it using the test client as well as a browser.</p>
 <div class="fragment"><div class="line"><a name="l00001"></a><span class="lineno">    1</span>&#160;$ libwebsockets-test-client localhost</div></div><!-- fragment --><p>will by default connect to the test server on localhost:7681 and print the dumb increment number from the server at the same time as drawing random circles in the mirror protocol; if you connect to the test server using a browser at the same time you will be able to see the circles being drawn.</p>
 <p>The test client supports SSL too, use</p>
 <div class="fragment"><div class="line"><a name="l00001"></a><span class="lineno">    1</span>&#160;$ libwebsockets-test-client localhost --ssl -s</div></div><!-- fragment --><p>the -s tells it to accept the default selfsigned cert from the server, otherwise it will strictly fail the connection if there is no CA cert to validate the server's certificate.</p>
-<h2>Choosing between test server variations </h2>
+<h1><a class="anchor" id="choosingts"></a>
+Choosing between test server variations</h1>
 <p>If you will be doing standalone serving with lws, ideally you should avoid making your own server at all, and use lwsws with your own protocol plugins.</p>
 <p>The second best option is follow test-server-v2.0.c, which uses a mount to autoserve a directory, and lws protocol plugins for ws, without needing any user callback code (other than what's needed in the protocol plugin).</p>
 <p>For those two options libuv is needed to support the protocol plugins, if that's not possible then the other variations with their own protocol code should be considered.</p>
-<h2>Testing simple echo </h2>
+<h1><a class="anchor" id="echo"></a>
+Testing simple echo</h1>
 <p>You can test against <code>echo.websockets.org</code> as a sanity test like this (the client connects to port <code>80</code> by default):</p>
 <div class="fragment"><div class="line"><a name="l00001"></a><span class="lineno">    1</span>&#160;$ libwebsockets-test-echo --client echo.websocket.org</div></div><!-- fragment --><p>This echo test is of limited use though because it doesn't negotiate any protocol. You can run the same test app as a local server, by default on localhost:7681 </p><div class="fragment"><div class="line"><a name="l00001"></a><span class="lineno">    1</span>&#160;$ libwebsockets-test-echo</div></div><!-- fragment --><p> and do the echo test against the local echo server </p><div class="fragment"><div class="line"><a name="l00001"></a><span class="lineno">    1</span>&#160;$ libwebsockets-test-echo --client localhost --port 7681</div></div><!-- fragment --><p> If you add the <code>--ssl</code> switch to both the client and server, you can also test with an encrypted link.</p>
-<h2>Testing SSL on the client side </h2>
+<h1><a class="anchor" id="tassl"></a>
+Testing SSL on the client side</h1>
 <p>To test SSL/WSS client action, just run the client test with </p><div class="fragment"><div class="line"><a name="l00001"></a><span class="lineno">    1</span>&#160;$ libwebsockets-test-client localhost --ssl</div></div><!-- fragment --><p> By default the client test applet is set to accept selfsigned certificates used by the test server, this is indicated by the <code>use_ssl</code> var being set to <code>2</code>. Set it to <code>1</code> to reject any server certificate that it doesn't have a trusted CA cert for.</p>
-<h2>Using the websocket ping utility </h2>
+<h1><a class="anchor" id="taping"></a>
+Using the websocket ping utility</h1>
 <p>libwebsockets-test-ping connects as a client to a remote websocket server and pings it like the normal unix ping utility. </p><div class="fragment"><div class="line"><a name="l00001"></a><span class="lineno">    1</span>&#160;$ libwebsockets-test-ping localhost</div><div class="line"><a name="l00002"></a><span class="lineno">    2</span>&#160;handshake OK for protocol lws-mirror-protocol</div><div class="line"><a name="l00003"></a><span class="lineno">    3</span>&#160;Websocket PING localhost.localdomain (127.0.0.1) 64 bytes of data.</div><div class="line"><a name="l00004"></a><span class="lineno">    4</span>&#160;64 bytes from localhost: req=1 time=0.1ms</div><div class="line"><a name="l00005"></a><span class="lineno">    5</span>&#160;64 bytes from localhost: req=2 time=0.1ms</div><div class="line"><a name="l00006"></a><span class="lineno">    6</span>&#160;64 bytes from localhost: req=3 time=0.1ms</div><div class="line"><a name="l00007"></a><span class="lineno">    7</span>&#160;64 bytes from localhost: req=4 time=0.2ms</div><div class="line"><a name="l00008"></a><span class="lineno">    8</span>&#160;64 bytes from localhost: req=5 time=0.1ms</div><div class="line"><a name="l00009"></a><span class="lineno">    9</span>&#160;64 bytes from localhost: req=6 time=0.2ms</div><div class="line"><a name="l00010"></a><span class="lineno">   10</span>&#160;64 bytes from localhost: req=7 time=0.2ms</div><div class="line"><a name="l00011"></a><span class="lineno">   11</span>&#160;64 bytes from localhost: req=8 time=0.1ms</div><div class="line"><a name="l00012"></a><span class="lineno">   12</span>&#160;^C</div><div class="line"><a name="l00013"></a><span class="lineno">   13</span>&#160;--- localhost.localdomain websocket ping statistics ---</div><div class="line"><a name="l00014"></a><span class="lineno">   14</span>&#160;8 packets transmitted, 8 received, 0% packet loss, time 7458ms</div><div class="line"><a name="l00015"></a><span class="lineno">   15</span>&#160;rtt min/avg/max = 0.110/0.185/0.218 ms</div><div class="line"><a name="l00016"></a><span class="lineno">   16</span>&#160;$</div></div><!-- fragment --><p> By default it sends 64 byte payload packets using the 04 PING packet opcode type. You can change the payload size using the <code>-s=</code> flag, up to a maximum of 125 mandated by the 04 standard.</p>
 <p>Using the lws-mirror protocol that is provided by the test server, libwebsockets-test-ping can also use larger payload sizes up to 4096 is BINARY packets; lws-mirror will copy them back to the client and they appear as a PONG. Use the <code>-m</code> flag to select this operation.</p>
 <p>The default interval between pings is 1s, you can use the -i= flag to set this, including fractions like <code>-i=0.01</code> for 10ms interval.</p>
 <p>Before you can even use the PING opcode that is part of the standard, you must complete a handshake with a specified protocol. By default lws-mirror-protocol is used which is supported by the test server. But if you are using it on another server, you can specify the protcol to handshake with by <code>--protocol=protocolname</code></p>
-<h2>Fraggle test app </h2>
+<h1><a class="anchor" id="ta"></a>
+fraggle Fraggle test app</h1>
 <p>By default it runs in server mode </p><div class="fragment"><div class="line"><a name="l00001"></a><span class="lineno">    1</span>&#160;$ libwebsockets-test-fraggle</div><div class="line"><a name="l00002"></a><span class="lineno">    2</span>&#160;libwebsockets test fraggle</div><div class="line"><a name="l00003"></a><span class="lineno">    3</span>&#160;(C) Copyright 2010-2011 Andy Green &lt;andy@warmcat.com&gt; licensed under LGPL2.1</div><div class="line"><a name="l00004"></a><span class="lineno">    4</span>&#160; Compiled with SSL support, not using it</div><div class="line"><a name="l00005"></a><span class="lineno">    5</span>&#160; Listening on port 7681</div><div class="line"><a name="l00006"></a><span class="lineno">    6</span>&#160;server sees client connect</div><div class="line"><a name="l00007"></a><span class="lineno">    7</span>&#160;accepted v06 connection</div><div class="line"><a name="l00008"></a><span class="lineno">    8</span>&#160;Spamming 360 random fragments</div><div class="line"><a name="l00009"></a><span class="lineno">    9</span>&#160;Spamming session over, len = 371913. sum = 0x2D3C0AE</div><div class="line"><a name="l00010"></a><span class="lineno">   10</span>&#160;Spamming 895 random fragments</div><div class="line"><a name="l00011"></a><span class="lineno">   11</span>&#160;Spamming session over, len = 875970. sum = 0x6A74DA1</div><div class="line"><a name="l00012"></a><span class="lineno">   12</span>&#160;...</div></div><!-- fragment --><p> You need to run a second session in client mode, you have to give the <code>-c</code> switch and the server address at least: </p><div class="fragment"><div class="line"><a name="l00001"></a><span class="lineno">    1</span>&#160;$ libwebsockets-test-fraggle -c localhost</div><div class="line"><a name="l00002"></a><span class="lineno">    2</span>&#160;libwebsockets test fraggle</div><div class="line"><a name="l00003"></a><span class="lineno">    3</span>&#160;(C) Copyright 2010-2011 Andy Green &lt;andy@warmcat.com&gt; licensed under LGPL2.1</div><div class="line"><a name="l00004"></a><span class="lineno">    4</span>&#160; Client mode</div><div class="line"><a name="l00005"></a><span class="lineno">    5</span>&#160;Connecting to localhost:7681</div><div class="line"><a name="l00006"></a><span class="lineno">    6</span>&#160;denied deflate-stream extension</div><div class="line"><a name="l00007"></a><span class="lineno">    7</span>&#160;handshake OK for protocol fraggle-protocol</div><div class="line"><a name="l00008"></a><span class="lineno">    8</span>&#160;client connects to server</div><div class="line"><a name="l00009"></a><span class="lineno">    9</span>&#160;EOM received 371913 correctly from 360 fragments</div><div class="line"><a name="l00010"></a><span class="lineno">   10</span>&#160;EOM received 875970 correctly from 895 fragments</div><div class="line"><a name="l00011"></a><span class="lineno">   11</span>&#160;EOM received 247140 correctly from 258 fragments</div><div class="line"><a name="l00012"></a><span class="lineno">   12</span>&#160;EOM received 695451 correctly from 692 fragments</div><div class="line"><a name="l00013"></a><span class="lineno">   13</span>&#160;...</div></div><!-- fragment --><p> The fraggle test sends a random number up to 1024 fragmented websocket frames each of a random size between 1 and 2001 bytes in a single message, then sends a checksum and starts sending a new randomly sized and fragmented message.</p>
 <p>The fraggle test client receives the same message fragments and computes the same checksum using websocket framing to see when the message has ended. It then accepts the server checksum message and compares that to its checksum.</p>
-<h2>proxy support </h2>
+<h1><a class="anchor" id="taproxy"></a>
+proxy support</h1>
 <p>The http_proxy environment variable is respected by the client connection code for both <code>ws://</code> and <code>wss://</code>. It doesn't support authentication.</p>
-<p>You use it like this </p><div class="fragment"><div class="line"><a name="l00001"></a><span class="lineno">    1</span>&#160;$ export http_proxy=myproxy.com:3128</div><div class="line"><a name="l00002"></a><span class="lineno">    2</span>&#160;$ libwebsockets-test-client someserver.com</div></div><!-- fragment --><h2>debug logging </h2>
+<p>You use it like this </p><div class="fragment"><div class="line"><a name="l00001"></a><span class="lineno">    1</span>&#160;$ export http_proxy=myproxy.com:3128</div><div class="line"><a name="l00002"></a><span class="lineno">    2</span>&#160;$ libwebsockets-test-client someserver.com</div></div><!-- fragment --><h1><a class="anchor" id="talog"></a>
+debug logging</h1>
 <p>By default logging of severity "notice", "warn" or "err" is enabled to stderr.</p>
 <p>Again by default other logging is compiled in but disabled from printing.</p>
-<p>If you want to eliminate the debug logging below notice in severity, use the <code>--disable-debug</code> configure option to have it removed from the code by the preprocesser.</p>
-<p>If you want to see more detailed debug logs, you can control a bitfield to select which logs types may print using the <code><a class="el" href="group__log.html#ga244647f9e1bf0097ccdde66d74f41e26">lws_set_log_level()</a></code> api, in the test apps you can use <code>-d &lt;number&gt;</code> to control this. The types of logging available are (OR together the numbers to select multiple)</p>
+<p>By default debug logs below "notice" in severity are not compiled in. To get them included, add this option in CMAKE</p>
+<div class="fragment"><div class="line"><a name="l00001"></a><span class="lineno">    1</span>&#160;$ cmake .. -DCMAKE_BUILD_TYPE=DEBUG</div></div><!-- fragment --><p>If you want to see more detailed debug logs, you can control a bitfield to select which logs types may print using the <code><a class="el" href="group__log.html#ga244647f9e1bf0097ccdde66d74f41e26">lws_set_log_level()</a></code> api, in the test apps you can use <code>-d &lt;number&gt;</code> to control this. The types of logging available are (OR together the numbers to select multiple)</p>
 <ul>
 <li>1 ERR</li>
 <li>2 WARN</li>
@@ -135,13 +146,16 @@ $(document).ready(function(){initNavTree('md_README.test-apps.html','');});
 <li>256 CLIENT</li>
 <li>512 LATENCY</li>
 </ul>
-<h2>Websocket version supported </h2>
+<h1><a class="anchor" id="ws13"></a>
+Websocket version supported</h1>
 <p>The final IETF standard is supported for both client and server, protocol version 13.</p>
-<h2>Latency Tracking </h2>
+<h1><a class="anchor" id="latency"></a>
+Latency Tracking</h1>
 <p>Since libwebsockets runs using <code>poll()</code> and a single threaded approach, any unexpected latency coming from system calls would be bad news. There's now a latency tracking scheme that can be built in with <code>--with-latency</code> at configure-time, logging the time taken for system calls to complete and if the whole action did complete that time or was deferred.</p>
 <p>You can see the detailed data by enabling logging level 512 (eg, <code>-d 519</code> on the test server to see that and the usual logs), however even without that the "worst" latency is kept and reported to the logs with NOTICE severity when the context is destroyed.</p>
 <p>Some care is needed interpreting them, if the action completed the first figure (in us) is the time taken for the whole action, which may have retried through the poll loop many times and will depend on network roundtrip times. High figures here don't indicate a problem. The figure in us reported after "lat" in the logging is the time taken by this particular attempt. High figures here may indicate a problem, or if you system is loaded with another app at that time, such as the browser, it may simply indicate the OS gave preferential treatment to the other app during that call.</p>
-<h2>Autobahn Test Suite </h2>
+<h1><a class="anchor" id="autobahn"></a>
+Autobahn Test Suite</h1>
 <p>Lws can be tested against the autobahn websocket fuzzer.</p>
 <p>1) pip install autobahntestsuite</p>
 <p>2) wstest -m fuzzingserver</p>
@@ -154,9 +168,10 @@ $(document).ready(function(){initNavTree('md_README.test-apps.html','');});
 <p>5) In a browser go to the directory you ran wstest in (eg, /projects/libwebsockets)</p>
 <p><a href="file:///projects/libwebsockets/reports/clients/index.html">file:///projects/libwebsockets/reports/clients/index.html</a></p>
 <p>to see the results</p>
-<h2>Autobahn Test Notes </h2>
+<h1><a class="anchor" id="autobahnnotes"></a>
+Autobahn Test Notes</h1>
 <p>1) Autobahn tests the user code + lws implementation. So to get the same results, you need to follow test-echo.c in terms of user implmentation.</p>
-<p>2) Some of the tests make no sense for Libwebsockets to support and we fail them.</p>
+<p>2) Two of the tests make no sense for Libwebsockets to support and we fail them.</p>
 <ul>
 <li>Tests 2.10 + 2.11: sends multiple pings on one connection. Lws policy is to only allow one active ping in flight on each connection, the rest are dropped. The autobahn test itself admits this is not part of the standard, just someone's random opinion about how they think a ws server should act. So we will fail this by design and it is no problem about RFC6455 compliance. </li>
 </ul>
index 5f23200..f0e7b5b 100644 (file)
@@ -2,11 +2,97 @@ var NAVTREE =
 [
   [ "libwebsockets", "index.html", [
     [ "Libwebsockets API introduction", "index.html", null ],
-    [ "Notes about building lws", "md_README.build.html", null ],
-    [ "Notes about lwsws", "md_README.lwsws.html", null ],
-    [ "Notes about coding with lws", "md_README.coding.html", null ],
-    [ "Notes about generic-sessions Plugin", "md_README.generic-sessions.html", null ],
-    [ "Overview of lws test apps", "md_README.test-apps.html", null ],
+    [ "Notes about building lws", "md_README.build.html", [
+      [ "Introduction to CMake", "md_README.build.html#cm", null ],
+      [ "Building the library and test apps", "md_README.build.html#build1", null ],
+      [ "Building on Unix:", "md_README.build.html#bu", null ],
+      [ "Quirk of cmake", "md_README.build.html#cmq", null ],
+      [ "Building on Windows (Visual Studio)", "md_README.build.html#cmw", null ],
+      [ "Building on Windows (MinGW)", "md_README.build.html#cmwmgw", null ],
+      [ "Building on mbed3", "md_README.build.html#mbed3", null ],
+      [ "Setting compile options", "md_README.build.html#cmco", [
+        [ "Command line", "md_README.build.html#cmcocl", null ],
+        [ "Unix GUI", "md_README.build.html#cmcoug", null ],
+        [ "Windows GUI", "md_README.build.html#cmcowg", null ]
+      ] ],
+      [ "wolfSSL/CyaSSL replacement for OpenSSL", "md_README.build.html#wolf", null ],
+      [ "Compiling libwebsockets with wolfSSL", "md_README.build.html#wolf1", null ],
+      [ "Compiling libwebsockets with CyaSSL", "md_README.build.html#cya", null ],
+      [ "Building plugins outside of lws itself", "md_README.build.html#extplugins", null ],
+      [ "Reproducing HTTP2.0 tests", "md_README.build.html#http2rp", null ],
+      [ "Cross compiling", "md_README.build.html#cross", null ],
+      [ "Memory efficiency", "md_README.build.html#mem", null ]
+    ] ],
+    [ "Notes about lwsws", "md_README.lwsws.html", [
+      [ "Libwebsockets Web Server", "md_README.lwsws.html#lwsws", null ],
+      [ "Build", "md_README.lwsws.html#lwswsb", null ],
+      [ "Lwsws Configuration", "md_README.lwsws.html#lwswsc", null ],
+      [ "Lwsws Vhosts", "md_README.lwsws.html#lwswsv", null ],
+      [ "Lwsws Vhost name and port sharing", "md_README.lwsws.html#lwswsvn", null ],
+      [ "Lwsws Protocols", "md_README.lwsws.html#lwswspr", null ],
+      [ "Lwsws Other vhost options", "md_README.lwsws.html#lwswsovo", null ],
+      [ "Lwsws Mounts", "md_README.lwsws.html#lwswsm", null ],
+      [ "Lwsws Other mount options", "md_README.lwsws.html#lwswsomo", null ],
+      [ "Lwsws Plugins", "md_README.lwsws.html#lwswspl", null ],
+      [ "Additional plugin search paths", "md_README.lwsws.html#lwswsplaplp", null ],
+      [ "lws-server-status plugin", "md_README.lwsws.html#lwswsssp", null ],
+      [ "Lwsws Integration with Systemd", "md_README.lwsws.html#lwswssysd", null ],
+      [ "Lwsws Integration with logrotate", "md_README.lwsws.html#lwswslr", null ]
+    ] ],
+    [ "Notes about coding with lws", "md_README.coding.html", [
+      [ "Daemonization", "md_README.coding.html#dae", null ],
+      [ "Maximum number of connections", "md_README.coding.html#conns", null ],
+      [ "Libwebsockets is singlethreaded", "md_README.coding.html#evtloop", null ],
+      [ "Only send data when socket writeable", "md_README.coding.html#writeable", null ],
+      [ "Do not rely on only your own WRITEABLE requests appearing", "md_README.coding.html#otherwr", null ],
+      [ "Closing connections from the user side", "md_README.coding.html#closing", null ],
+      [ "Fragmented messages", "md_README.coding.html#frags", null ],
+      [ "Debug Logging", "md_README.coding.html#debuglog", null ],
+      [ "External Polling Loop support", "md_README.coding.html#extpoll", null ],
+      [ "Using with in c++ apps", "md_README.coding.html#cpp", null ],
+      [ "Availability of header information", "md_README.coding.html#headerinfo", null ],
+      [ "TCP Keepalive", "md_README.coding.html#ka", null ],
+      [ "Optimizing SSL connections", "md_README.coding.html#sslopt", null ],
+      [ "Async nature of client connections", "md_README.coding.html#clientasync", null ],
+      [ "Lws platform-independent file access apis", "md_README.coding.html#fileapi", null ],
+      [ "ECDH Support", "md_README.coding.html#ecdh", null ],
+      [ "SMP / Multithreaded service", "md_README.coding.html#smp", null ],
+      [ "Libev / Libuv support", "md_README.coding.html#libevuv", null ],
+      [ "Extension option control from user code", "md_README.coding.html#extopts", null ],
+      [ "Client connections as HTTP[S] rather than WS[S]", "md_README.coding.html#httpsclient", null ],
+      [ "Using lws vhosts", "md_README.coding.html#vhosts", null ],
+      [ "How lws matches hostname or SNI to a vhost", "md_README.coding.html#sni", null ],
+      [ "Using lws mounts on a vhost", "md_README.coding.html#mounts", null ],
+      [ "Operation of LWSMPRO_CALLBACK mounts", "md_README.coding.html#mountcallback", null ]
+    ] ],
+    [ "Notes about generic-sessions Plugin", "md_README.generic-sessions.html", [
+      [ "Enabling lwsgs for build", "md_README.generic-sessions.html#gseb", null ],
+      [ "lwsgs Introduction", "md_README.generic-sessions.html#gsi", null ],
+      [ "Lwsgs Integration to HTML", "md_README.generic-sessions.html#gsin", null ],
+      [ "Lwsgs Overall Flow@", "md_README.generic-sessions.html#gsof", null ],
+      [ "Lwsgs Configuration", "md_README.generic-sessions.html#gsconf", null ],
+      [ "Lwsgs Password Confounder", "md_README.generic-sessions.html#gspwc", null ],
+      [ "Lwsgs Preparing the db directory", "md_README.generic-sessions.html#gsprep", null ],
+      [ "Lwsgs Email configuration", "md_README.generic-sessions.html#gsrmail", null ],
+      [ "Lwsgs Integration with another protocol", "md_README.generic-sessions.html#gsap", null ]
+    ] ],
+    [ "Overview of lws test apps", "md_README.test-apps.html", [
+      [ "Testing server with a browser", "md_README.test-apps.html#tsb", null ],
+      [ "Running test server as a Daemon", "md_README.test-apps.html#tsd", null ],
+      [ "Using SSL on the server side", "md_README.test-apps.html#sssl", null ],
+      [ "Testing websocket client support", "md_README.test-apps.html#wscl", null ],
+      [ "Choosing between test server variations", "md_README.test-apps.html#choosingts", null ],
+      [ "Testing simple echo", "md_README.test-apps.html#echo", null ],
+      [ "Testing SSL on the client side", "md_README.test-apps.html#tassl", null ],
+      [ "Using the websocket ping utility", "md_README.test-apps.html#taping", null ],
+      [ "fraggle Fraggle test app", "md_README.test-apps.html#ta", null ],
+      [ "proxy support", "md_README.test-apps.html#taproxy", null ],
+      [ "debug logging", "md_README.test-apps.html#talog", null ],
+      [ "Websocket version supported", "md_README.test-apps.html#ws13", null ],
+      [ "Latency Tracking", "md_README.test-apps.html#latency", null ],
+      [ "Autobahn Test Suite", "md_README.test-apps.html#autobahn", null ],
+      [ "Autobahn Test Notes", "md_README.test-apps.html#autobahnnotes", null ]
+    ] ],
     [ "Deprecated List", "deprecated.html", null ],
     [ "Modules", "modules.html", "modules" ],
     [ "Data Structures", "annotated.html", [
@@ -37,7 +123,8 @@ var NAVTREEINDEX =
 "annotated.html",
 "group__context-and-vhost.html#gga41c2d763f78cc248df3b9f8645dbd2a5ac962efd35abf6c402f9fb14aa14f5016",
 "group__sha.html#ga7b09ab74646266f0b555103b3bb8dfe5",
-"libwebsockets_8h.html#a42394a38f08a97420c98127358cfeedbad9cdc12a796e6c7d912278834d9c7dde"
+"libwebsockets_8h.html#a42394a38f08a97420c98127358cfeedbad9cdc12a796e6c7d912278834d9c7dde",
+"structlws__process__html__args.html#a362547891ee0d693f3900a1f807ea475"
 ];
 
 var SYNCONMSG = 'click to disable panel synchronisation';
index f6f1e69..4871d7d 100644 (file)
@@ -37,28 +37,28 @@ var NAVTREEINDEX0 =
 "globals_l.html":[9,1,0,1],
 "globals_type.html":[9,1,2],
 "group__HTTP-headers-create.html":[7,6,3],
-"group__HTTP-headers-create.html#ga29b7d6d2ddfdbaff3d8b607e7e3151b6":[9,0,0,0,41],
 "group__HTTP-headers-create.html#ga29b7d6d2ddfdbaff3d8b607e7e3151b6":[7,6,3,3],
-"group__HTTP-headers-create.html#ga2b36bf44405755ff51c1939303b995a8":[9,0,0,0,38],
+"group__HTTP-headers-create.html#ga29b7d6d2ddfdbaff3d8b607e7e3151b6":[9,0,0,0,41],
 "group__HTTP-headers-create.html#ga2b36bf44405755ff51c1939303b995a8":[7,6,3,0],
-"group__HTTP-headers-create.html#ga4887605ff2242a54db3a7fa01f6f864b":[9,0,0,0,76],
+"group__HTTP-headers-create.html#ga2b36bf44405755ff51c1939303b995a8":[9,0,0,0,38],
 "group__HTTP-headers-create.html#ga4887605ff2242a54db3a7fa01f6f864b":[7,6,3,4],
-"group__HTTP-headers-create.html#gacc76a5babcb4dce1b01b1955aa7a2faf":[9,0,0,0,40],
+"group__HTTP-headers-create.html#ga4887605ff2242a54db3a7fa01f6f864b":[9,0,0,0,76],
 "group__HTTP-headers-create.html#gacc76a5babcb4dce1b01b1955aa7a2faf":[7,6,3,2],
+"group__HTTP-headers-create.html#gacc76a5babcb4dce1b01b1955aa7a2faf":[9,0,0,0,40],
 "group__HTTP-headers-create.html#gaf74adb761b22566ad70004882712dce1":[7,6,3,1],
 "group__HTTP-headers-create.html#gaf74adb761b22566ad70004882712dce1":[9,0,0,0,39],
 "group__HTTP-headers-read.html":[7,6,4],
-"group__HTTP-headers-read.html#ga2c0597b2ef1d2cee35736c338bcbd17b":[7,6,4,7],
 "group__HTTP-headers-read.html#ga2c0597b2ef1d2cee35736c338bcbd17b":[9,0,0,0,143],
-"group__HTTP-headers-read.html#ga594f3d0ece5b09c2ccf9f98ea533bb4e":[9,0,0,0,97],
+"group__HTTP-headers-read.html#ga2c0597b2ef1d2cee35736c338bcbd17b":[7,6,4,7],
 "group__HTTP-headers-read.html#ga594f3d0ece5b09c2ccf9f98ea533bb4e":[7,6,4,5],
-"group__HTTP-headers-read.html#ga6ce6aa1c0155ea42b7708bed271d1c77":[9,0,0,0,95],
+"group__HTTP-headers-read.html#ga594f3d0ece5b09c2ccf9f98ea533bb4e":[9,0,0,0,97],
 "group__HTTP-headers-read.html#ga6ce6aa1c0155ea42b7708bed271d1c77":[7,6,4,3],
+"group__HTTP-headers-read.html#ga6ce6aa1c0155ea42b7708bed271d1c77":[9,0,0,0,95],
 "group__HTTP-headers-read.html#ga6e747906f9d76532ec118d6ef418b82e":[9,0,0,0,31],
-"group__HTTP-headers-read.html#ga84e9ce5e71a77501a0998ac403a984c2":[9,0,0,0,93],
 "group__HTTP-headers-read.html#ga84e9ce5e71a77501a0998ac403a984c2":[7,6,4,2],
-"group__HTTP-headers-read.html#ga8ade0e1ffb0da7e62b989d8d867bf6c8":[9,0,0,0,98],
+"group__HTTP-headers-read.html#ga84e9ce5e71a77501a0998ac403a984c2":[9,0,0,0,93],
 "group__HTTP-headers-read.html#ga8ade0e1ffb0da7e62b989d8d867bf6c8":[7,6,4,6],
+"group__HTTP-headers-read.html#ga8ade0e1ffb0da7e62b989d8d867bf6c8":[9,0,0,0,98],
 "group__HTTP-headers-read.html#gaa427cad61a9a5e3004afd65c4527b5e9":[7,6,4,4],
 "group__HTTP-headers-read.html#gaa427cad61a9a5e3004afd65c4527b5e9":[9,0,0,0,96],
 "group__HTTP-headers-read.html#gga6e747906f9d76532ec118d6ef418b82ea03293996964a8bb617215508908048d4":[9,0,0,0,31,42],
@@ -156,8 +156,8 @@ var NAVTREEINDEX0 =
 "group__Protocols-and-Plugins.html":[7,10],
 "group__Protocols-and-Plugins.html#ga106b37ae9c247e84d191ab09441adc43":[7,10,4],
 "group__Protocols-and-Plugins.html#ga106b37ae9c247e84d191ab09441adc43":[9,0,0,0,77],
-"group__Protocols-and-Plugins.html#ga25754726d97c5f519d313e691a9fe29d":[7,10,9],
 "group__Protocols-and-Plugins.html#ga25754726d97c5f519d313e691a9fe29d":[9,0,0,0,151],
+"group__Protocols-and-Plugins.html#ga25754726d97c5f519d313e691a9fe29d":[7,10,9],
 "group__Protocols-and-Plugins.html#ga40994491e1567f91f579d2b444775266":[9,0,0,0,12],
 "group__Protocols-and-Plugins.html#ga72ad550786ca7976463589d347e62112":[7,10,5],
 "group__Protocols-and-Plugins.html#ga72ad550786ca7976463589d347e62112":[9,0,0,0,89],
@@ -196,8 +196,8 @@ var NAVTREEINDEX0 =
 "group__client.html#ga4f44b8230e6732816ca5cd8d1aaaf340":[9,0,0,0,102],
 "group__client.html#ga96f3dbad54b2853969cfa933d66871ce":[9,0,0,0,21],
 "group__client.html#ga96f3dbad54b2853969cfa933d66871ce":[7,2,1],
-"group__client.html#gac6a8558b4410961a880241c2ac1271e2":[9,0,0,0,60],
 "group__client.html#gac6a8558b4410961a880241c2ac1271e2":[7,2,3],
+"group__client.html#gac6a8558b4410961a880241c2ac1271e2":[9,0,0,0,60],
 "group__client.html#gga96f3dbad54b2853969cfa933d66871cea7051e79bb97b69862f2ff00ae5298ec7":[9,0,0,0,21,0],
 "group__client.html#gga96f3dbad54b2853969cfa933d66871cea89866ab6a749aaa1684158c55f826b35":[9,0,0,0,21,2],
 "group__client.html#gga96f3dbad54b2853969cfa933d66871ceafc72c0ffbc7462bdddd4ce7bd99ac092":[9,0,0,0,21,1],
@@ -206,48 +206,48 @@ var NAVTREEINDEX0 =
 "group__context-and-vhost.html#ga06e77ce2916f8bc9826ef8d9d68e3932":[9,0,0,0,94],
 "group__context-and-vhost.html#ga0c54c667ccd9b8b3dddcd123ca72f87c":[7,4,7],
 "group__context-and-vhost.html#ga0c54c667ccd9b8b3dddcd123ca72f87c":[9,0,0,0,66],
-"group__context-and-vhost.html#ga341064721add2618ae1b29717493a212":[7,4,14],
 "group__context-and-vhost.html#ga341064721add2618ae1b29717493a212":[9,0,0,0,158],
-"group__context-and-vhost.html#ga41c2d763f78cc248df3b9f8645dbd2a5":[7,4,3],
+"group__context-and-vhost.html#ga341064721add2618ae1b29717493a212":[7,4,14],
 "group__context-and-vhost.html#ga41c2d763f78cc248df3b9f8645dbd2a5":[9,0,0,0,23],
+"group__context-and-vhost.html#ga41c2d763f78cc248df3b9f8645dbd2a5":[7,4,3],
 "group__context-and-vhost.html#ga7e9d5405547a457d86e0b4f0ae2bb1c4":[7,4,11],
 "group__context-and-vhost.html#ga7e9d5405547a457d86e0b4f0ae2bb1c4":[9,0,0,0,133],
-"group__context-and-vhost.html#ga8db03e19a372e34ac25cf21af894a02c":[7,4,12],
 "group__context-and-vhost.html#ga8db03e19a372e34ac25cf21af894a02c":[9,0,0,0,150],
+"group__context-and-vhost.html#ga8db03e19a372e34ac25cf21af894a02c":[7,4,12],
 "group__context-and-vhost.html#ga8ee0314028755f1ddfa9428e09b4fddb":[7,4,4],
 "group__context-and-vhost.html#ga8ee0314028755f1ddfa9428e09b4fddb":[9,0,0,0,63],
 "group__context-and-vhost.html#ga94e6cc2223c4eec316b13bcebc3628b6":[7,4,10],
 "group__context-and-vhost.html#ga94e6cc2223c4eec316b13bcebc3628b6":[9,0,0,0,108],
-"group__context-and-vhost.html#ga98d88c9080fd89c37114363a6474ea73":[7,4,13],
 "group__context-and-vhost.html#ga98d88c9080fd89c37114363a6474ea73":[9,0,0,0,157],
+"group__context-and-vhost.html#ga98d88c9080fd89c37114363a6474ea73":[7,4,13],
 "group__context-and-vhost.html#gae2134657cdd2ea7a59e13ad314e4c50d":[7,4,9],
 "group__context-and-vhost.html#gae2134657cdd2ea7a59e13ad314e4c50d":[9,0,0,0,107],
 "group__context-and-vhost.html#gaeb12f934bfd178bd2132a9e73fc641da":[7,4,5],
 "group__context-and-vhost.html#gaeb12f934bfd178bd2132a9e73fc641da":[9,0,0,0,64],
-"group__context-and-vhost.html#gaf2fff58562caab7510c41eeac85a8648":[7,4,6],
 "group__context-and-vhost.html#gaf2fff58562caab7510c41eeac85a8648":[9,0,0,0,65],
-"group__context-and-vhost.html#gga41c2d763f78cc248df3b9f8645dbd2a5a1b2f8bde0f62adc7ebe81b2043f34c0c":[7,4,3,8],
+"group__context-and-vhost.html#gaf2fff58562caab7510c41eeac85a8648":[7,4,6],
 "group__context-and-vhost.html#gga41c2d763f78cc248df3b9f8645dbd2a5a1b2f8bde0f62adc7ebe81b2043f34c0c":[9,0,0,0,23,8],
-"group__context-and-vhost.html#gga41c2d763f78cc248df3b9f8645dbd2a5a1cc4562d05cba52a6dfa0697a65ade0d":[7,4,3,2],
+"group__context-and-vhost.html#gga41c2d763f78cc248df3b9f8645dbd2a5a1b2f8bde0f62adc7ebe81b2043f34c0c":[7,4,3,8],
 "group__context-and-vhost.html#gga41c2d763f78cc248df3b9f8645dbd2a5a1cc4562d05cba52a6dfa0697a65ade0d":[9,0,0,0,23,2],
-"group__context-and-vhost.html#gga41c2d763f78cc248df3b9f8645dbd2a5a273d9975675130de0c6dc937dde7c8a6":[7,4,3,3],
+"group__context-and-vhost.html#gga41c2d763f78cc248df3b9f8645dbd2a5a1cc4562d05cba52a6dfa0697a65ade0d":[7,4,3,2],
 "group__context-and-vhost.html#gga41c2d763f78cc248df3b9f8645dbd2a5a273d9975675130de0c6dc937dde7c8a6":[9,0,0,0,23,3],
-"group__context-and-vhost.html#gga41c2d763f78cc248df3b9f8645dbd2a5a274ed462a1a9239eb6ddf9007f5b7092":[7,4,3,0],
+"group__context-and-vhost.html#gga41c2d763f78cc248df3b9f8645dbd2a5a273d9975675130de0c6dc937dde7c8a6":[7,4,3,3],
 "group__context-and-vhost.html#gga41c2d763f78cc248df3b9f8645dbd2a5a274ed462a1a9239eb6ddf9007f5b7092":[9,0,0,0,23,0],
-"group__context-and-vhost.html#gga41c2d763f78cc248df3b9f8645dbd2a5a34ab36e68c0d593b6f19b8d5ef1240a9":[7,4,3,4],
+"group__context-and-vhost.html#gga41c2d763f78cc248df3b9f8645dbd2a5a274ed462a1a9239eb6ddf9007f5b7092":[7,4,3,0],
 "group__context-and-vhost.html#gga41c2d763f78cc248df3b9f8645dbd2a5a34ab36e68c0d593b6f19b8d5ef1240a9":[9,0,0,0,23,4],
-"group__context-and-vhost.html#gga41c2d763f78cc248df3b9f8645dbd2a5a4832187186c4d130c68051214cd42ada":[7,4,3,10],
+"group__context-and-vhost.html#gga41c2d763f78cc248df3b9f8645dbd2a5a34ab36e68c0d593b6f19b8d5ef1240a9":[7,4,3,4],
 "group__context-and-vhost.html#gga41c2d763f78cc248df3b9f8645dbd2a5a4832187186c4d130c68051214cd42ada":[9,0,0,0,23,10],
-"group__context-and-vhost.html#gga41c2d763f78cc248df3b9f8645dbd2a5a4933347a821e73c3f1e13fb6bfc7ad93":[7,4,3,5],
+"group__context-and-vhost.html#gga41c2d763f78cc248df3b9f8645dbd2a5a4832187186c4d130c68051214cd42ada":[7,4,3,10],
 "group__context-and-vhost.html#gga41c2d763f78cc248df3b9f8645dbd2a5a4933347a821e73c3f1e13fb6bfc7ad93":[9,0,0,0,23,5],
-"group__context-and-vhost.html#gga41c2d763f78cc248df3b9f8645dbd2a5a6582c985ee0ceaadc1d277030eae2d7c":[7,4,3,1],
+"group__context-and-vhost.html#gga41c2d763f78cc248df3b9f8645dbd2a5a4933347a821e73c3f1e13fb6bfc7ad93":[7,4,3,5],
 "group__context-and-vhost.html#gga41c2d763f78cc248df3b9f8645dbd2a5a6582c985ee0ceaadc1d277030eae2d7c":[9,0,0,0,23,1],
-"group__context-and-vhost.html#gga41c2d763f78cc248df3b9f8645dbd2a5a7fed6a527c8d5e0acac1b4179644583a":[7,4,3,11],
+"group__context-and-vhost.html#gga41c2d763f78cc248df3b9f8645dbd2a5a6582c985ee0ceaadc1d277030eae2d7c":[7,4,3,1],
 "group__context-and-vhost.html#gga41c2d763f78cc248df3b9f8645dbd2a5a7fed6a527c8d5e0acac1b4179644583a":[9,0,0,0,23,11],
-"group__context-and-vhost.html#gga41c2d763f78cc248df3b9f8645dbd2a5a9637e9001d8c8b2521086bcafbd8a941":[7,4,3,13],
+"group__context-and-vhost.html#gga41c2d763f78cc248df3b9f8645dbd2a5a7fed6a527c8d5e0acac1b4179644583a":[7,4,3,11],
 "group__context-and-vhost.html#gga41c2d763f78cc248df3b9f8645dbd2a5a9637e9001d8c8b2521086bcafbd8a941":[9,0,0,0,23,13],
-"group__context-and-vhost.html#gga41c2d763f78cc248df3b9f8645dbd2a5aa0158b4e85420811e6b0f1378c6ded0f":[7,4,3,7],
+"group__context-and-vhost.html#gga41c2d763f78cc248df3b9f8645dbd2a5a9637e9001d8c8b2521086bcafbd8a941":[7,4,3,13],
 "group__context-and-vhost.html#gga41c2d763f78cc248df3b9f8645dbd2a5aa0158b4e85420811e6b0f1378c6ded0f":[9,0,0,0,23,7],
-"group__context-and-vhost.html#gga41c2d763f78cc248df3b9f8645dbd2a5ac56a8a6590e74a8016d0fae09fb404fc":[7,4,3,6],
-"group__context-and-vhost.html#gga41c2d763f78cc248df3b9f8645dbd2a5ac56a8a6590e74a8016d0fae09fb404fc":[9,0,0,0,23,6]
+"group__context-and-vhost.html#gga41c2d763f78cc248df3b9f8645dbd2a5aa0158b4e85420811e6b0f1378c6ded0f":[7,4,3,7],
+"group__context-and-vhost.html#gga41c2d763f78cc248df3b9f8645dbd2a5ac56a8a6590e74a8016d0fae09fb404fc":[9,0,0,0,23,6],
+"group__context-and-vhost.html#gga41c2d763f78cc248df3b9f8645dbd2a5ac56a8a6590e74a8016d0fae09fb404fc":[7,4,3,6]
 };
index f707c94..b895bd6 100644 (file)
@@ -1,15 +1,15 @@
 var NAVTREEINDEX1 =
 {
-"group__context-and-vhost.html#gga41c2d763f78cc248df3b9f8645dbd2a5ac962efd35abf6c402f9fb14aa14f5016":[7,4,3,14],
 "group__context-and-vhost.html#gga41c2d763f78cc248df3b9f8645dbd2a5ac962efd35abf6c402f9fb14aa14f5016":[9,0,0,0,23,14],
-"group__context-and-vhost.html#gga41c2d763f78cc248df3b9f8645dbd2a5aca5d42820b65eac5618ec3f0bd8a1160":[7,4,3,16],
+"group__context-and-vhost.html#gga41c2d763f78cc248df3b9f8645dbd2a5ac962efd35abf6c402f9fb14aa14f5016":[7,4,3,14],
 "group__context-and-vhost.html#gga41c2d763f78cc248df3b9f8645dbd2a5aca5d42820b65eac5618ec3f0bd8a1160":[9,0,0,0,23,16],
-"group__context-and-vhost.html#gga41c2d763f78cc248df3b9f8645dbd2a5accc9d0d11d1124a21659586164b0962e":[7,4,3,12],
+"group__context-and-vhost.html#gga41c2d763f78cc248df3b9f8645dbd2a5aca5d42820b65eac5618ec3f0bd8a1160":[7,4,3,16],
 "group__context-and-vhost.html#gga41c2d763f78cc248df3b9f8645dbd2a5accc9d0d11d1124a21659586164b0962e":[9,0,0,0,23,12],
-"group__context-and-vhost.html#gga41c2d763f78cc248df3b9f8645dbd2a5af62887536e25e053e68741006dba46d8":[7,4,3,15],
+"group__context-and-vhost.html#gga41c2d763f78cc248df3b9f8645dbd2a5accc9d0d11d1124a21659586164b0962e":[7,4,3,12],
 "group__context-and-vhost.html#gga41c2d763f78cc248df3b9f8645dbd2a5af62887536e25e053e68741006dba46d8":[9,0,0,0,23,15],
-"group__context-and-vhost.html#gga41c2d763f78cc248df3b9f8645dbd2a5aff121db04a10cf8b2c5df9d4f2b89f1e":[7,4,3,9],
+"group__context-and-vhost.html#gga41c2d763f78cc248df3b9f8645dbd2a5af62887536e25e053e68741006dba46d8":[7,4,3,15],
 "group__context-and-vhost.html#gga41c2d763f78cc248df3b9f8645dbd2a5aff121db04a10cf8b2c5df9d4f2b89f1e":[9,0,0,0,23,9],
+"group__context-and-vhost.html#gga41c2d763f78cc248df3b9f8645dbd2a5aff121db04a10cf8b2c5df9d4f2b89f1e":[7,4,3,9],
 "group__ev.html":[7,21],
 "group__ev.html#ga3b0ffd4d2b4fa791c0fd75353a330208":[9,0,0,0,8],
 "group__ev.html#ga3fdd23ded693b21853356dc9eaef5ccc":[9,0,0,0,71],
@@ -20,17 +20,17 @@ var NAVTREEINDEX1 =
 "group__extensions.html#ga4cdbe42d872e21a448a947714d6c607e":[9,0,0,0,75],
 "group__extensions.html#ga6fb3e2c3dfb9d64dc87026a4e99c128b":[7,5,5],
 "group__extensions.html#ga6fb3e2c3dfb9d64dc87026a4e99c128b":[9,0,0,0,74],
-"group__extensions.html#gaae7169b2cd346b34fa33d0250db2afd0":[7,5,3],
 "group__extensions.html#gaae7169b2cd346b34fa33d0250db2afd0":[9,0,0,0,9],
+"group__extensions.html#gaae7169b2cd346b34fa33d0250db2afd0":[7,5,3],
 "group__extensions.html#gacc9f55936dc165257a2e1f7d47bce89e":[9,0,0,0,25],
 "group__extensions.html#gacc9f55936dc165257a2e1f7d47bce89e":[7,5,4],
 "group__extensions.html#gae0e24e1768f83a7fb07896ce975704b9":[7,5,7],
 "group__extensions.html#gae0e24e1768f83a7fb07896ce975704b9":[9,0,0,0,131],
 "group__extensions.html#gae9993815eee72c6070300a0ae2f022d7":[9,0,0,0,26],
-"group__extensions.html#ggacc9f55936dc165257a2e1f7d47bce89ea1c86adf924c8786a12bee9687094673e":[9,0,0,0,25,1],
 "group__extensions.html#ggacc9f55936dc165257a2e1f7d47bce89ea1c86adf924c8786a12bee9687094673e":[7,5,4,1],
-"group__extensions.html#ggacc9f55936dc165257a2e1f7d47bce89ea5265abe3e1c3f64412f2affe7bffd880":[9,0,0,0,25,2],
+"group__extensions.html#ggacc9f55936dc165257a2e1f7d47bce89ea1c86adf924c8786a12bee9687094673e":[9,0,0,0,25,1],
 "group__extensions.html#ggacc9f55936dc165257a2e1f7d47bce89ea5265abe3e1c3f64412f2affe7bffd880":[7,5,4,2],
+"group__extensions.html#ggacc9f55936dc165257a2e1f7d47bce89ea5265abe3e1c3f64412f2affe7bffd880":[9,0,0,0,25,2],
 "group__extensions.html#ggacc9f55936dc165257a2e1f7d47bce89eaabcf56c456c1ff6e81dc82586a16f14c":[9,0,0,0,25,0],
 "group__extensions.html#ggacc9f55936dc165257a2e1f7d47bce89eaabcf56c456c1ff6e81dc82586a16f14c":[7,5,4,0],
 "group__extensions.html#ggae9993815eee72c6070300a0ae2f022d7a05b74161bfab0f815d7fd47b85e20bfc":[9,0,0,0,26,9],
@@ -68,24 +68,24 @@ var NAVTREEINDEX1 =
 "group__form-parsing.html#ga162f86762173a2bc8c28497941d74815":[9,0,0,0,136],
 "group__form-parsing.html#ga2da476217166da02704b90d3a8d4f3cd":[7,6,0,6],
 "group__form-parsing.html#ga2da476217166da02704b90d3a8d4f3cd":[9,0,0,0,140],
-"group__form-parsing.html#ga3fbe378632f85ec9a14cc2c1687bf05f":[7,6,0,5],
 "group__form-parsing.html#ga3fbe378632f85ec9a14cc2c1687bf05f":[9,0,0,0,139],
-"group__form-parsing.html#ga41a74a822771d3dce89751aa3bce28ae":[9,0,0,0,30],
+"group__form-parsing.html#ga3fbe378632f85ec9a14cc2c1687bf05f":[7,6,0,5],
 "group__form-parsing.html#ga41a74a822771d3dce89751aa3bce28ae":[7,6,0,1],
+"group__form-parsing.html#ga41a74a822771d3dce89751aa3bce28ae":[9,0,0,0,30],
 "group__form-parsing.html#ga5a70527c0861c2ffa3d29333a6aa7f8e":[7,6,0,0],
 "group__form-parsing.html#ga5a70527c0861c2ffa3d29333a6aa7f8e":[9,0,0,0,15],
 "group__form-parsing.html#ga83835bf250ee3d4a60f36a182f2b8d24":[7,6,0,4],
 "group__form-parsing.html#ga83835bf250ee3d4a60f36a182f2b8d24":[9,0,0,0,138],
 "group__form-parsing.html#ga9ad9ebf5ea1a7108415ed7e04cb231d2":[7,6,0,7],
 "group__form-parsing.html#ga9ad9ebf5ea1a7108415ed7e04cb231d2":[9,0,0,0,141],
-"group__form-parsing.html#gaaa482f07dad3f04b391cccf0a814e13b":[7,6,0,3],
 "group__form-parsing.html#gaaa482f07dad3f04b391cccf0a814e13b":[9,0,0,0,137],
-"group__form-parsing.html#gga41a74a822771d3dce89751aa3bce28aea2d25de44865bd44e5a3903a2bab9ca83":[9,0,0,0,30,2],
+"group__form-parsing.html#gaaa482f07dad3f04b391cccf0a814e13b":[7,6,0,3],
 "group__form-parsing.html#gga41a74a822771d3dce89751aa3bce28aea2d25de44865bd44e5a3903a2bab9ca83":[7,6,0,1,2],
-"group__form-parsing.html#gga41a74a822771d3dce89751aa3bce28aea6ce2a55a4c3695cdb640c893d95bd3a7":[9,0,0,0,30,1],
+"group__form-parsing.html#gga41a74a822771d3dce89751aa3bce28aea2d25de44865bd44e5a3903a2bab9ca83":[9,0,0,0,30,2],
 "group__form-parsing.html#gga41a74a822771d3dce89751aa3bce28aea6ce2a55a4c3695cdb640c893d95bd3a7":[7,6,0,1,1],
-"group__form-parsing.html#gga41a74a822771d3dce89751aa3bce28aead3a958e7719ac273c3ba4f684f00c87f":[9,0,0,0,30,0],
+"group__form-parsing.html#gga41a74a822771d3dce89751aa3bce28aea6ce2a55a4c3695cdb640c893d95bd3a7":[9,0,0,0,30,1],
 "group__form-parsing.html#gga41a74a822771d3dce89751aa3bce28aead3a958e7719ac273c3ba4f684f00c87f":[7,6,0,1,0],
+"group__form-parsing.html#gga41a74a822771d3dce89751aa3bce28aead3a958e7719ac273c3ba4f684f00c87f":[9,0,0,0,30,0],
 "group__generic-sessions.html":[7,10,0],
 "group__generic-sessions.html#ga7c2dc7bfb4ccb91c5d771f9e9ea237e1":[7,10,0,5],
 "group__generic-sessions.html#ga7c2dc7bfb4ccb91c5d771f9e9ea237e1":[9,0,0,0,33],
@@ -138,12 +138,12 @@ var NAVTREEINDEX1 =
 "group__html-chunked-substitution.html#ggabc3b93f68c8bdd857ad32913628dfa8daf06c31278cb67d7eec4b2b8157b9ad25":[9,0,0,0,18,9],
 "group__html-chunked-substitution.html#ggabc3b93f68c8bdd857ad32913628dfa8dafac24097912a70f224166528ce44b83b":[9,0,0,0,18,7],
 "group__http.html":[7,6],
-"group__http.html#ga8fbf01e473ac421fc33ad9f8da8b8a25":[9,0,0,0,100],
 "group__http.html#ga8fbf01e473ac421fc33ad9f8da8b8a25":[7,6,7],
-"group__http.html#gac8a4a71240857dc6b2ed70456b6923f4":[9,0,0,0,120],
+"group__http.html#ga8fbf01e473ac421fc33ad9f8da8b8a25":[9,0,0,0,100],
 "group__http.html#gac8a4a71240857dc6b2ed70456b6923f4":[7,6,9],
-"group__http.html#gad27aed6c66a41b2b89ffe4da2a309e8a":[9,0,0,0,101],
+"group__http.html#gac8a4a71240857dc6b2ed70456b6923f4":[9,0,0,0,120],
 "group__http.html#gad27aed6c66a41b2b89ffe4da2a309e8a":[7,6,8],
+"group__http.html#gad27aed6c66a41b2b89ffe4da2a309e8a":[9,0,0,0,101],
 "group__httpft.html":[7,6,2],
 "group__httpft.html#ga29e1123f6d56cd777b3e5bf9ca40f9e5":[9,0,0,0,125],
 "group__httpft.html#gab393a06d3d2722af4c3f8b06842c80d7":[7,6,2,1],
@@ -152,15 +152,15 @@ var NAVTREEINDEX1 =
 "group__httpft.html#gab4da87a4800413f15e7aba649fb1d77c":[9,0,0,0,84],
 "group__log.html":[7,7],
 "group__log.html#ga14542b84d2c76efa7814124bb10f9c5f":[9,0,0,0,28],
-"group__log.html#ga244647f9e1bf0097ccdde66d74f41e26":[9,0,0,0,132],
 "group__log.html#ga244647f9e1bf0097ccdde66d74f41e26":[7,7,0],
+"group__log.html#ga244647f9e1bf0097ccdde66d74f41e26":[9,0,0,0,132],
 "group__log.html#ga42e39775c6b69b7251bdbf5a2cdd5dcd":[9,0,0,0,156],
 "group__log.html#ga42e39775c6b69b7251bdbf5a2cdd5dcd":[7,7,3],
 "group__log.html#ga74eb146969f0595e12ea835851b4588e":[9,0,0,0,37],
 "group__log.html#ga898b1f03872ad019f507d4e35bbefa90":[9,0,0,0,155],
 "group__log.html#ga898b1f03872ad019f507d4e35bbefa90":[7,7,2],
-"group__log.html#gab7c0fc936cc9f1eb58e2bb234c15147c":[7,7,1],
 "group__log.html#gab7c0fc936cc9f1eb58e2bb234c15147c":[9,0,0,0,154],
+"group__log.html#gab7c0fc936cc9f1eb58e2bb234c15147c":[7,7,1],
 "group__log.html#gaf5f07837692b2f231a79da8a058288aa":[9,0,0,0,36],
 "group__log.html#gga14542b84d2c76efa7814124bb10f9c5fa083a44e71966a0e768426e477e1bc358":[9,0,0,0,28,8],
 "group__log.html#gga14542b84d2c76efa7814124bb10f9c5fa2be9c1d50d05756078e9abc72c9e50cc":[9,0,0,0,28,5],
@@ -174,29 +174,29 @@ var NAVTREEINDEX1 =
 "group__log.html#gga14542b84d2c76efa7814124bb10f9c5fae4235ca28326353e283bc7dd1b39bd86":[9,0,0,0,28,9],
 "group__log.html#gga14542b84d2c76efa7814124bb10f9c5faff4895280366d59ef0c5e9f4578241af":[9,0,0,0,28,0],
 "group__misc.html":[7,8],
-"group__misc.html#ga0af4f7d2dd375aeedcfa7eb0e1101c4b":[9,0,0,0,80],
 "group__misc.html#ga0af4f7d2dd375aeedcfa7eb0e1101c4b":[7,8,2],
+"group__misc.html#ga0af4f7d2dd375aeedcfa7eb0e1101c4b":[9,0,0,0,80],
 "group__misc.html#ga0e705d498e8c8500649a26ba30a1e106":[9,0,0,0,118],
 "group__misc.html#ga1ec0d9faac5d3a5824d765c287c043aa":[9,0,0,0,113],
 "group__misc.html#ga1ec0d9faac5d3a5824d765c287c043aa":[7,8,8],
-"group__misc.html#ga33bf2635033710b25f931b57ed663e1e":[9,0,0,0,112],
 "group__misc.html#ga33bf2635033710b25f931b57ed663e1e":[7,8,7],
-"group__misc.html#ga58f906c6be0ca80efd813f694569dd4a":[9,0,0,0,90],
+"group__misc.html#ga33bf2635033710b25f931b57ed663e1e":[9,0,0,0,112],
 "group__misc.html#ga58f906c6be0ca80efd813f694569dd4a":[7,8,6],
-"group__misc.html#ga629f48268fd1856b54b11172991b97d9":[9,0,0,0,81],
+"group__misc.html#ga58f906c6be0ca80efd813f694569dd4a":[9,0,0,0,90],
 "group__misc.html#ga629f48268fd1856b54b11172991b97d9":[7,8,3],
-"group__misc.html#ga8930fe36a3f3eefe4a6a4fd499d8e899":[9,0,0,0,85],
+"group__misc.html#ga629f48268fd1856b54b11172991b97d9":[9,0,0,0,81],
 "group__misc.html#ga8930fe36a3f3eefe4a6a4fd499d8e899":[7,8,5],
+"group__misc.html#ga8930fe36a3f3eefe4a6a4fd499d8e899":[9,0,0,0,85],
 "group__misc.html#gaa194584fff9698f3b280658f770ccd0f":[9,0,0,0,153],
 "group__misc.html#gaa194584fff9698f3b280658f770ccd0f":[7,8,10],
-"group__misc.html#gab321ed812f46f6dc7ef9e3ca6f00cf1b":[9,0,0,0,130],
 "group__misc.html#gab321ed812f46f6dc7ef9e3ca6f00cf1b":[7,8,9],
-"group__misc.html#gac6abfc0b2bd5b2f09281a4432bb2f5f0":[9,0,0,0,83],
+"group__misc.html#gab321ed812f46f6dc7ef9e3ca6f00cf1b":[9,0,0,0,130],
 "group__misc.html#gac6abfc0b2bd5b2f09281a4432bb2f5f0":[7,8,4],
-"group__misc.html#gacae4d7b6a8d22e4c2d82ff8b12c1e234":[9,0,0,0,79],
+"group__misc.html#gac6abfc0b2bd5b2f09281a4432bb2f5f0":[9,0,0,0,83],
 "group__misc.html#gacae4d7b6a8d22e4c2d82ff8b12c1e234":[7,8,1],
-"group__misc.html#gace5171b1dbbc03ec89a98f8afdb5c9af":[9,0,0,0,67],
+"group__misc.html#gacae4d7b6a8d22e4c2d82ff8b12c1e234":[9,0,0,0,79],
 "group__misc.html#gace5171b1dbbc03ec89a98f8afdb5c9af":[7,8,0],
+"group__misc.html#gace5171b1dbbc03ec89a98f8afdb5c9af":[9,0,0,0,67],
 "group__net.html":[7,9],
 "group__net.html#ga092e5f473b3347f03ffeef8a950080f3":[7,9,1],
 "group__net.html#ga092e5f473b3347f03ffeef8a950080f3":[9,0,0,0,86],
@@ -207,21 +207,21 @@ var NAVTREEINDEX1 =
 "group__net.html#gad0df22db2be9fc65a667a1e83f9a92a4":[7,9,0],
 "group__net.html#gad0df22db2be9fc65a667a1e83f9a92a4":[9,0,0,0,54],
 "group__pur.html":[7,12],
-"group__pur.html#ga9cc82f06e5ae7e71458626d7a39a5865":[7,12,1],
 "group__pur.html#ga9cc82f06e5ae7e71458626d7a39a5865":[9,0,0,0,142],
+"group__pur.html#ga9cc82f06e5ae7e71458626d7a39a5865":[7,12,1],
 "group__pur.html#gab15187efcfa256b7c928562c182b92a3":[7,12,0],
 "group__pur.html#gab15187efcfa256b7c928562c182b92a3":[9,0,0,0,109],
 "group__sending-data.html":[7,13],
 "group__sending-data.html#ga98b099cf8c1c7e38ad78501f270e193d":[7,13,0],
 "group__sending-data.html#ga98b099cf8c1c7e38ad78501f270e193d":[9,0,0,0,32],
-"group__sending-data.html#gafd5fdd285a0e25ba7e3e1051deec1001":[7,13,1],
 "group__sending-data.html#gafd5fdd285a0e25ba7e3e1051deec1001":[9,0,0,0,152],
+"group__sending-data.html#gafd5fdd285a0e25ba7e3e1051deec1001":[7,13,1],
 "group__sending-data.html#gga98b099cf8c1c7e38ad78501f270e193da10047eb05b5e1c298151dc47a5b44826":[7,13,0,2],
 "group__sending-data.html#gga98b099cf8c1c7e38ad78501f270e193da10047eb05b5e1c298151dc47a5b44826":[9,0,0,0,32,2],
 "group__sending-data.html#gga98b099cf8c1c7e38ad78501f270e193da115440f272a5d55518adfc8099acfee3":[7,13,0,5],
 "group__sending-data.html#gga98b099cf8c1c7e38ad78501f270e193da115440f272a5d55518adfc8099acfee3":[9,0,0,0,32,8],
-"group__sending-data.html#gga98b099cf8c1c7e38ad78501f270e193da220d8e8652d9b97fb66e476e2a60ffce":[9,0,0,0,32,9],
 "group__sending-data.html#gga98b099cf8c1c7e38ad78501f270e193da220d8e8652d9b97fb66e476e2a60ffce":[7,13,0,6],
+"group__sending-data.html#gga98b099cf8c1c7e38ad78501f270e193da220d8e8652d9b97fb66e476e2a60ffce":[9,0,0,0,32,9],
 "group__sending-data.html#gga98b099cf8c1c7e38ad78501f270e193da6e556322ff8f205bf311608f7f6e6559":[9,0,0,0,32,4],
 "group__sending-data.html#gga98b099cf8c1c7e38ad78501f270e193da80e8f169fda236c56bfb795ed62903db":[7,13,0,0],
 "group__sending-data.html#gga98b099cf8c1c7e38ad78501f270e193da80e8f169fda236c56bfb795ed62903db":[9,0,0,0,32,0],
@@ -240,14 +240,14 @@ var NAVTREEINDEX1 =
 "group__service.html#ga53e3d0801dfda7960a7249dd559e68a2":[9,0,0,0,52],
 "group__service.html#ga9b3cc4473fd8848e5bbee7f310712939":[7,0,5],
 "group__service.html#ga9b3cc4473fd8848e5bbee7f310712939":[9,0,0,0,129],
-"group__service.html#gad82efa5466d14a9f05aa06416375b28d":[9,0,0,0,127],
 "group__service.html#gad82efa5466d14a9f05aa06416375b28d":[7,0,3],
+"group__service.html#gad82efa5466d14a9f05aa06416375b28d":[9,0,0,0,127],
 "group__service.html#gaebf426eda371ba23642fc11d8e0ace6b":[7,0,4],
 "group__service.html#gaebf426eda371ba23642fc11d8e0ace6b":[9,0,0,0,128],
-"group__service.html#gaf95bd0c663d6516a0c80047d9b1167a8":[9,0,0,0,126],
 "group__service.html#gaf95bd0c663d6516a0c80047d9b1167a8":[7,0,2],
+"group__service.html#gaf95bd0c663d6516a0c80047d9b1167a8":[9,0,0,0,126],
 "group__sha.html":[7,11],
 "group__sha.html#ga66316e6a5a0644a09d5a10e919dfdd8d":[7,11,0],
 "group__sha.html#ga66316e6a5a0644a09d5a10e919dfdd8d":[9,0,0,0,44],
-"group__sha.html#ga7b09ab74646266f0b555103b3bb8dfe5":[7,11,2]
+"group__sha.html#ga7b09ab74646266f0b555103b3bb8dfe5":[9,0,0,0,135]
 };
index d7c5e55..ee0f0af 100644 (file)
@@ -1,6 +1,6 @@
 var NAVTREEINDEX2 =
 {
-"group__sha.html#ga7b09ab74646266f0b555103b3bb8dfe5":[9,0,0,0,135],
+"group__sha.html#ga7b09ab74646266f0b555103b3bb8dfe5":[7,11,2],
 "group__sha.html#gaf39765e4a3b413efb65e4698b2ec3575":[7,11,1],
 "group__sha.html#gaf39765e4a3b413efb65e4698b2ec3575":[9,0,0,0,45],
 "group__smtp.html":[7,14],
@@ -10,35 +10,35 @@ var NAVTREEINDEX2 =
 "group__smtp.html#ga25298a5afc1074e13b2d5711a86432b2":[9,0,0,0,69],
 "group__smtp.html#ga5e535e346d92a9daf00be33abf79d4eb":[7,14,2],
 "group__smtp.html#ga5e535e346d92a9daf00be33abf79d4eb":[9,0,0,0,68],
-"group__smtp.html#ga77fc9b56a1bb39484844981ec375fc29":[7,14,4],
 "group__smtp.html#ga77fc9b56a1bb39484844981ec375fc29":[9,0,0,0,70],
+"group__smtp.html#ga77fc9b56a1bb39484844981ec375fc29":[7,14,4],
 "group__smtp.html#gga116be79bf44f9dc2a97f46e051fe4dc0a1dfec948a864205cec875f63cbe0d4ad":[7,14,1,3],
 "group__smtp.html#gga116be79bf44f9dc2a97f46e051fe4dc0a1dfec948a864205cec875f63cbe0d4ad":[9,0,0,0,34,3],
-"group__smtp.html#gga116be79bf44f9dc2a97f46e051fe4dc0a29e5b0ecf75375b5a643faa3d6222b7c":[7,14,1,0],
 "group__smtp.html#gga116be79bf44f9dc2a97f46e051fe4dc0a29e5b0ecf75375b5a643faa3d6222b7c":[9,0,0,0,34,0],
+"group__smtp.html#gga116be79bf44f9dc2a97f46e051fe4dc0a29e5b0ecf75375b5a643faa3d6222b7c":[7,14,1,0],
 "group__smtp.html#gga116be79bf44f9dc2a97f46e051fe4dc0a2c2ed16ffc572326e3040684084b21d5":[7,14,1,8],
 "group__smtp.html#gga116be79bf44f9dc2a97f46e051fe4dc0a2c2ed16ffc572326e3040684084b21d5":[9,0,0,0,34,8],
 "group__smtp.html#gga116be79bf44f9dc2a97f46e051fe4dc0a38fba41f28d754e38079b31418a86a69":[7,14,1,7],
 "group__smtp.html#gga116be79bf44f9dc2a97f46e051fe4dc0a38fba41f28d754e38079b31418a86a69":[9,0,0,0,34,7],
 "group__smtp.html#gga116be79bf44f9dc2a97f46e051fe4dc0a85e3c452950c09a79086bff4b9be5c14":[7,14,1,6],
 "group__smtp.html#gga116be79bf44f9dc2a97f46e051fe4dc0a85e3c452950c09a79086bff4b9be5c14":[9,0,0,0,34,6],
-"group__smtp.html#gga116be79bf44f9dc2a97f46e051fe4dc0a929bb4623ff3f585108aba2a1b047fab":[7,14,1,4],
 "group__smtp.html#gga116be79bf44f9dc2a97f46e051fe4dc0a929bb4623ff3f585108aba2a1b047fab":[9,0,0,0,34,4],
-"group__smtp.html#gga116be79bf44f9dc2a97f46e051fe4dc0aae20a0cb95b97a70f6b45d0ed2d5be83":[7,14,1,5],
+"group__smtp.html#gga116be79bf44f9dc2a97f46e051fe4dc0a929bb4623ff3f585108aba2a1b047fab":[7,14,1,4],
 "group__smtp.html#gga116be79bf44f9dc2a97f46e051fe4dc0aae20a0cb95b97a70f6b45d0ed2d5be83":[9,0,0,0,34,5],
-"group__smtp.html#gga116be79bf44f9dc2a97f46e051fe4dc0ab61778f70ecac007b334bb14942eb41d":[9,0,0,0,34,2],
+"group__smtp.html#gga116be79bf44f9dc2a97f46e051fe4dc0aae20a0cb95b97a70f6b45d0ed2d5be83":[7,14,1,5],
 "group__smtp.html#gga116be79bf44f9dc2a97f46e051fe4dc0ab61778f70ecac007b334bb14942eb41d":[7,14,1,2],
-"group__smtp.html#gga116be79bf44f9dc2a97f46e051fe4dc0ab89442b7a3ca2b94c3cdcf33756eb933":[7,14,1,1],
+"group__smtp.html#gga116be79bf44f9dc2a97f46e051fe4dc0ab61778f70ecac007b334bb14942eb41d":[9,0,0,0,34,2],
 "group__smtp.html#gga116be79bf44f9dc2a97f46e051fe4dc0ab89442b7a3ca2b94c3cdcf33756eb933":[9,0,0,0,34,1],
+"group__smtp.html#gga116be79bf44f9dc2a97f46e051fe4dc0ab89442b7a3ca2b94c3cdcf33756eb933":[7,14,1,1],
 "group__sock-adopt.html":[7,15],
-"group__sock-adopt.html#gab2d045df0f81afe00891aaed312d552b":[7,15,1],
 "group__sock-adopt.html#gab2d045df0f81afe00891aaed312d552b":[9,0,0,0,43],
-"group__sock-adopt.html#gabe71b7462afb21c767bdc67334f305af":[7,15,0],
+"group__sock-adopt.html#gab2d045df0f81afe00891aaed312d552b":[7,15,1],
 "group__sock-adopt.html#gabe71b7462afb21c767bdc67334f305af":[9,0,0,0,42],
+"group__sock-adopt.html#gabe71b7462afb21c767bdc67334f305af":[7,15,0],
 "group__timeout.html":[7,3],
 "group__timeout.html#ga2c0aa4b9c3c55bae7b35cbfac3246c87":[9,0,0,0,35],
-"group__timeout.html#gaced9f9237f6172fed9f730a2af51345a":[9,0,0,0,134],
 "group__timeout.html#gaced9f9237f6172fed9f730a2af51345a":[7,3,0],
+"group__timeout.html#gaced9f9237f6172fed9f730a2af51345a":[9,0,0,0,134],
 "group__timeout.html#gga2c0aa4b9c3c55bae7b35cbfac3246c87a0d6b956db11acb6d263af3ea054a914e":[9,0,0,0,35,12],
 "group__timeout.html#gga2c0aa4b9c3c55bae7b35cbfac3246c87a0eef059426f37d00b75142d4dc3e25e3":[9,0,0,0,35,3],
 "group__timeout.html#gga2c0aa4b9c3c55bae7b35cbfac3246c87a1104c39d0177378713a9332ab7a9d7fe":[9,0,0,0,35,4],
@@ -56,13 +56,13 @@ var NAVTREEINDEX2 =
 "group__timeout.html#gga2c0aa4b9c3c55bae7b35cbfac3246c87ad7ebebb506afd30c48e1e5e3a578cd30":[9,0,0,0,35,1],
 "group__timeout.html#gga2c0aa4b9c3c55bae7b35cbfac3246c87ae8b3de955cec5da5ea52fe040f914501":[9,0,0,0,35,10],
 "group__urlendec.html":[7,6,5],
-"group__urlendec.html#gaa373a9c16acdd96c395af61ab915ece3":[7,6,5,0],
 "group__urlendec.html#gaa373a9c16acdd96c395af61ab915ece3":[9,0,0,0,144],
-"group__urlendec.html#gabc2888476e50e001c875c1a8abf455b7":[7,6,5,1],
+"group__urlendec.html#gaa373a9c16acdd96c395af61ab915ece3":[7,6,5,0],
 "group__urlendec.html#gabc2888476e50e001c875c1a8abf455b7":[9,0,0,0,145],
+"group__urlendec.html#gabc2888476e50e001c875c1a8abf455b7":[7,6,5,1],
 "group__usercb.html":[7,16],
-"group__usercb.html#gad4fcb82e68d60ffacca61a3f783a0a2f":[7,16,0],
 "group__usercb.html#gad4fcb82e68d60ffacca61a3f783a0a2f":[9,0,0,0,7],
+"group__usercb.html#gad4fcb82e68d60ffacca61a3f783a0a2f":[7,16,0],
 "group__usercb.html#gad62860e19975ba4c4af401c3cdb6abf7":[9,0,0,0,19],
 "group__usercb.html#gad62860e19975ba4c4af401c3cdb6abf7":[7,16,1],
 "group__usercb.html#ggad62860e19975ba4c4af401c3cdb6abf7a026502768778b8d79d62dd0fe4375fc6":[9,0,0,0,19,17],
@@ -80,8 +80,8 @@ var NAVTREEINDEX2 =
 "group__usercb.html#ggad62860e19975ba4c4af401c3cdb6abf7a1df60f314710236f9b53efbf468da768":[9,0,0,0,19,33],
 "group__usercb.html#ggad62860e19975ba4c4af401c3cdb6abf7a1df60f314710236f9b53efbf468da768":[7,16,1,33],
 "group__usercb.html#ggad62860e19975ba4c4af401c3cdb6abf7a23b90b5e5146e760bc3123ae1fd2a6e5":[9,0,0,0,19,40],
-"group__usercb.html#ggad62860e19975ba4c4af401c3cdb6abf7a24d39bf1cfc0bad9d92da9ac1717e439":[9,0,0,0,19,0],
 "group__usercb.html#ggad62860e19975ba4c4af401c3cdb6abf7a24d39bf1cfc0bad9d92da9ac1717e439":[7,16,1,0],
+"group__usercb.html#ggad62860e19975ba4c4af401c3cdb6abf7a24d39bf1cfc0bad9d92da9ac1717e439":[9,0,0,0,19,0],
 "group__usercb.html#ggad62860e19975ba4c4af401c3cdb6abf7a2db02fc6e1c17ab62b52109d1aa9d738":[9,0,0,0,19,7],
 "group__usercb.html#ggad62860e19975ba4c4af401c3cdb6abf7a2db02fc6e1c17ab62b52109d1aa9d738":[7,16,1,7],
 "group__usercb.html#ggad62860e19975ba4c4af401c3cdb6abf7a2fce9a8608220f32abbf1422a5498804":[9,0,0,0,19,14],
@@ -103,8 +103,8 @@ var NAVTREEINDEX2 =
 "group__usercb.html#ggad62860e19975ba4c4af401c3cdb6abf7a7e12418eec9bce85735e6460176ab604":[7,16,1,3],
 "group__usercb.html#ggad62860e19975ba4c4af401c3cdb6abf7a7ec8e2e9557ee02a4fc9f7dec7e2babc":[9,0,0,0,19,11],
 "group__usercb.html#ggad62860e19975ba4c4af401c3cdb6abf7a7ec8e2e9557ee02a4fc9f7dec7e2babc":[7,16,1,11],
-"group__usercb.html#ggad62860e19975ba4c4af401c3cdb6abf7a838b18d255c1b94a533287ba302a2eba":[9,0,0,0,19,5],
 "group__usercb.html#ggad62860e19975ba4c4af401c3cdb6abf7a838b18d255c1b94a533287ba302a2eba":[7,16,1,5],
+"group__usercb.html#ggad62860e19975ba4c4af401c3cdb6abf7a838b18d255c1b94a533287ba302a2eba":[9,0,0,0,19,5],
 "group__usercb.html#ggad62860e19975ba4c4af401c3cdb6abf7a8909732521d379179003d97ab7a05428":[9,0,0,0,19,35],
 "group__usercb.html#ggad62860e19975ba4c4af401c3cdb6abf7a8909732521d379179003d97ab7a05428":[7,16,1,35],
 "group__usercb.html#ggad62860e19975ba4c4af401c3cdb6abf7a89862929a72bff65257ca1d51a0fce4d":[9,0,0,0,19,52],
@@ -114,17 +114,17 @@ var NAVTREEINDEX2 =
 "group__usercb.html#ggad62860e19975ba4c4af401c3cdb6abf7a909cc2a7018864b0b71abacc4058fd8f":[7,16,1,24],
 "group__usercb.html#ggad62860e19975ba4c4af401c3cdb6abf7a982579753e70e59a9ea13ce628ac891a":[9,0,0,0,19,56],
 "group__usercb.html#ggad62860e19975ba4c4af401c3cdb6abf7a982579753e70e59a9ea13ce628ac891a":[7,16,1,39],
-"group__usercb.html#ggad62860e19975ba4c4af401c3cdb6abf7aa46f705dcf97502e95627ffde614f98b":[7,16,1,37],
 "group__usercb.html#ggad62860e19975ba4c4af401c3cdb6abf7aa46f705dcf97502e95627ffde614f98b":[9,0,0,0,19,37],
-"group__usercb.html#ggad62860e19975ba4c4af401c3cdb6abf7aa536e574a642ff3ab9e12bff7ba2c6a2":[7,16,1,2],
+"group__usercb.html#ggad62860e19975ba4c4af401c3cdb6abf7aa46f705dcf97502e95627ffde614f98b":[7,16,1,37],
 "group__usercb.html#ggad62860e19975ba4c4af401c3cdb6abf7aa536e574a642ff3ab9e12bff7ba2c6a2":[9,0,0,0,19,2],
+"group__usercb.html#ggad62860e19975ba4c4af401c3cdb6abf7aa536e574a642ff3ab9e12bff7ba2c6a2":[7,16,1,2],
 "group__usercb.html#ggad62860e19975ba4c4af401c3cdb6abf7aa627548e1296e654fcfab463ec3c9587":[9,0,0,0,19,15],
 "group__usercb.html#ggad62860e19975ba4c4af401c3cdb6abf7aa627548e1296e654fcfab463ec3c9587":[7,16,1,15],
 "group__usercb.html#ggad62860e19975ba4c4af401c3cdb6abf7aa87d2e82fffa42c3680c7403ef94216e":[9,0,0,0,19,34],
 "group__usercb.html#ggad62860e19975ba4c4af401c3cdb6abf7aa87d2e82fffa42c3680c7403ef94216e":[7,16,1,34],
 "group__usercb.html#ggad62860e19975ba4c4af401c3cdb6abf7aaffd08a5cae791c9f3c38ee242203900":[9,0,0,0,19,46],
-"group__usercb.html#ggad62860e19975ba4c4af401c3cdb6abf7ab69783a9fbf2ca71ad70706bda77b412":[9,0,0,0,19,32],
 "group__usercb.html#ggad62860e19975ba4c4af401c3cdb6abf7ab69783a9fbf2ca71ad70706bda77b412":[7,16,1,32],
+"group__usercb.html#ggad62860e19975ba4c4af401c3cdb6abf7ab69783a9fbf2ca71ad70706bda77b412":[9,0,0,0,19,32],
 "group__usercb.html#ggad62860e19975ba4c4af401c3cdb6abf7ab884f3d5f8a6126a0d34c0172f5e3725":[9,0,0,0,19,53],
 "group__usercb.html#ggad62860e19975ba4c4af401c3cdb6abf7abbbe7a0a67c5866ca9109d46823fc5b1":[9,0,0,0,19,8],
 "group__usercb.html#ggad62860e19975ba4c4af401c3cdb6abf7abbbe7a0a67c5866ca9109d46823fc5b1":[7,16,1,8],
@@ -140,8 +140,8 @@ var NAVTREEINDEX2 =
 "group__usercb.html#ggad62860e19975ba4c4af401c3cdb6abf7aca834dc035b7f7486f9ce40fde54fe9e":[7,16,1,30],
 "group__usercb.html#ggad62860e19975ba4c4af401c3cdb6abf7accd8753672d319a30b4b4c2fb775e84d":[9,0,0,0,19,20],
 "group__usercb.html#ggad62860e19975ba4c4af401c3cdb6abf7accd8753672d319a30b4b4c2fb775e84d":[7,16,1,20],
-"group__usercb.html#ggad62860e19975ba4c4af401c3cdb6abf7ad5d34583e3556e153eda91620b48cc49":[7,16,1,27],
 "group__usercb.html#ggad62860e19975ba4c4af401c3cdb6abf7ad5d34583e3556e153eda91620b48cc49":[9,0,0,0,19,27],
+"group__usercb.html#ggad62860e19975ba4c4af401c3cdb6abf7ad5d34583e3556e153eda91620b48cc49":[7,16,1,27],
 "group__usercb.html#ggad62860e19975ba4c4af401c3cdb6abf7ad724974204d51d688f569c5d387b967d":[9,0,0,0,19,43],
 "group__usercb.html#ggad62860e19975ba4c4af401c3cdb6abf7ad87774f1c7784cf632e1e2f5b51036e1":[9,0,0,0,19,48],
 "group__usercb.html#ggad62860e19975ba4c4af401c3cdb6abf7ad8c6207b0c4e732f3d507f0fb79370e8":[9,0,0,0,19,1],
@@ -150,18 +150,18 @@ var NAVTREEINDEX2 =
 "group__usercb.html#ggad62860e19975ba4c4af401c3cdb6abf7adfb41c92e2522712207ef7f2462b5e34":[7,16,1,31],
 "group__usercb.html#ggad62860e19975ba4c4af401c3cdb6abf7ae4986291b7a810fe290851d73bebeb1c":[9,0,0,0,19,21],
 "group__usercb.html#ggad62860e19975ba4c4af401c3cdb6abf7ae4986291b7a810fe290851d73bebeb1c":[7,16,1,21],
-"group__usercb.html#ggad62860e19975ba4c4af401c3cdb6abf7ae5ad65d779b7eab32ab67ceff91a3bac":[9,0,0,0,19,23],
 "group__usercb.html#ggad62860e19975ba4c4af401c3cdb6abf7ae5ad65d779b7eab32ab67ceff91a3bac":[7,16,1,23],
+"group__usercb.html#ggad62860e19975ba4c4af401c3cdb6abf7ae5ad65d779b7eab32ab67ceff91a3bac":[9,0,0,0,19,23],
 "group__usercb.html#ggad62860e19975ba4c4af401c3cdb6abf7ae8d1de0bb56e03aa58cb4d44b18edd2e":[9,0,0,0,19,12],
 "group__usercb.html#ggad62860e19975ba4c4af401c3cdb6abf7ae8d1de0bb56e03aa58cb4d44b18edd2e":[7,16,1,12],
 "group__usercb.html#ggad62860e19975ba4c4af401c3cdb6abf7ae9734e1d7af2abf291665ce9e4a728d3":[9,0,0,0,19,19],
 "group__usercb.html#ggad62860e19975ba4c4af401c3cdb6abf7ae9734e1d7af2abf291665ce9e4a728d3":[7,16,1,19],
 "group__usercb.html#ggad62860e19975ba4c4af401c3cdb6abf7af6cf80e57aae8ba0a57a5c456b1fe026":[9,0,0,0,19,55],
 "group__usercb.html#ggad62860e19975ba4c4af401c3cdb6abf7afc4b2f72cc9e424a750b506ce0cc4310":[9,0,0,0,19,51],
-"group__usercb.html#ggad62860e19975ba4c4af401c3cdb6abf7afd8fd77a1cc9405fcb4f26915d7f2d01":[7,16,1,29],
 "group__usercb.html#ggad62860e19975ba4c4af401c3cdb6abf7afd8fd77a1cc9405fcb4f26915d7f2d01":[9,0,0,0,19,29],
-"group__usercb.html#ggad62860e19975ba4c4af401c3cdb6abf7afedadfb3cde37a8ea4c84ed535f26d09":[9,0,0,0,19,16],
+"group__usercb.html#ggad62860e19975ba4c4af401c3cdb6abf7afd8fd77a1cc9405fcb4f26915d7f2d01":[7,16,1,29],
 "group__usercb.html#ggad62860e19975ba4c4af401c3cdb6abf7afedadfb3cde37a8ea4c84ed535f26d09":[7,16,1,16],
+"group__usercb.html#ggad62860e19975ba4c4af401c3cdb6abf7afedadfb3cde37a8ea4c84ed535f26d09":[9,0,0,0,19,16],
 "group__uv.html":[7,22],
 "group__uv.html#ga097c89497824d4de225a85a00661fc89":[9,0,0,0,110],
 "group__uv.html#ga3c75cd6ec3f80fc0a0c8ead4c4e71a15":[9,0,0,0,111],
@@ -172,20 +172,20 @@ var NAVTREEINDEX2 =
 "group__vhost-mounts.html":[7,4,0],
 "group__vhost-mounts.html#ga31eca18e50cb4357480f2fcad36ff437":[7,4,0,2],
 "group__vhost-mounts.html#ga31eca18e50cb4357480f2fcad36ff437":[9,0,0,0,29],
-"group__vhost-mounts.html#gga31eca18e50cb4357480f2fcad36ff437a13ab58b01ac6e05f595977f1e0f0db69":[7,4,0,2,3],
 "group__vhost-mounts.html#gga31eca18e50cb4357480f2fcad36ff437a13ab58b01ac6e05f595977f1e0f0db69":[9,0,0,0,29,3],
+"group__vhost-mounts.html#gga31eca18e50cb4357480f2fcad36ff437a13ab58b01ac6e05f595977f1e0f0db69":[7,4,0,2,3],
 "group__vhost-mounts.html#gga31eca18e50cb4357480f2fcad36ff437a1e9f0842b0e85db50fe648ed4ba9a4b0":[7,4,0,2,0],
 "group__vhost-mounts.html#gga31eca18e50cb4357480f2fcad36ff437a1e9f0842b0e85db50fe648ed4ba9a4b0":[9,0,0,0,29,0],
 "group__vhost-mounts.html#gga31eca18e50cb4357480f2fcad36ff437a42f2361cfe76cd287fa8fcfc502357e2":[7,4,0,2,2],
 "group__vhost-mounts.html#gga31eca18e50cb4357480f2fcad36ff437a42f2361cfe76cd287fa8fcfc502357e2":[9,0,0,0,29,2],
 "group__vhost-mounts.html#gga31eca18e50cb4357480f2fcad36ff437a8894d16316863077dfe530963ca59f67":[9,0,0,0,29,5],
 "group__vhost-mounts.html#gga31eca18e50cb4357480f2fcad36ff437a8894d16316863077dfe530963ca59f67":[7,4,0,2,5],
-"group__vhost-mounts.html#gga31eca18e50cb4357480f2fcad36ff437a946a88cf9c852eed2c0317f4115d19da":[7,4,0,2,6],
 "group__vhost-mounts.html#gga31eca18e50cb4357480f2fcad36ff437a946a88cf9c852eed2c0317f4115d19da":[9,0,0,0,29,6],
-"group__vhost-mounts.html#gga31eca18e50cb4357480f2fcad36ff437aec137a2434851bd856ceebfb697b9970":[7,4,0,2,4],
+"group__vhost-mounts.html#gga31eca18e50cb4357480f2fcad36ff437a946a88cf9c852eed2c0317f4115d19da":[7,4,0,2,6],
 "group__vhost-mounts.html#gga31eca18e50cb4357480f2fcad36ff437aec137a2434851bd856ceebfb697b9970":[9,0,0,0,29,4],
-"group__vhost-mounts.html#gga31eca18e50cb4357480f2fcad36ff437afbd10eb4777517ed1f6bfdcf3b9ea1d1":[9,0,0,0,29,1],
+"group__vhost-mounts.html#gga31eca18e50cb4357480f2fcad36ff437aec137a2434851bd856ceebfb697b9970":[7,4,0,2,4],
 "group__vhost-mounts.html#gga31eca18e50cb4357480f2fcad36ff437afbd10eb4777517ed1f6bfdcf3b9ea1d1":[7,4,0,2,1],
+"group__vhost-mounts.html#gga31eca18e50cb4357480f2fcad36ff437afbd10eb4777517ed1f6bfdcf3b9ea1d1":[9,0,0,0,29,1],
 "group__wsclose.html":[7,17],
 "group__wsclose.html#gaa1c863415d1783cd8de7938aa6efa262":[9,0,0,0,62],
 "group__wsclose.html#gaa1c863415d1783cd8de7938aa6efa262":[7,17,1],
@@ -204,17 +204,17 @@ var NAVTREEINDEX2 =
 "group__wsclose.html#ggae399c571df32ba532c0ca67da9284985a4b8a3b7ce6f731e5248e4b0fb64a5044":[7,17,0,5],
 "group__wsclose.html#ggae399c571df32ba532c0ca67da9284985a68b3d34bebd88547dcfa5cadba0acd6c":[9,0,0,0,22,7],
 "group__wsclose.html#ggae399c571df32ba532c0ca67da9284985a68b3d34bebd88547dcfa5cadba0acd6c":[7,17,0,6],
-"group__wsclose.html#ggae399c571df32ba532c0ca67da9284985a7aef2da0062da606eeb35aaca5cf9050":[7,17,0,7],
 "group__wsclose.html#ggae399c571df32ba532c0ca67da9284985a7aef2da0062da606eeb35aaca5cf9050":[9,0,0,0,22,8],
+"group__wsclose.html#ggae399c571df32ba532c0ca67da9284985a7aef2da0062da606eeb35aaca5cf9050":[7,17,0,7],
 "group__wsclose.html#ggae399c571df32ba532c0ca67da9284985a9737a68759e739856b150ff9dfa30218":[9,0,0,0,22,2],
 "group__wsclose.html#ggae399c571df32ba532c0ca67da9284985a9737a68759e739856b150ff9dfa30218":[7,17,0,1],
-"group__wsclose.html#ggae399c571df32ba532c0ca67da9284985ac6a161822783ee873be1c66f48d14e0e":[9,0,0,0,22,11],
 "group__wsclose.html#ggae399c571df32ba532c0ca67da9284985ac6a161822783ee873be1c66f48d14e0e":[7,17,0,10],
+"group__wsclose.html#ggae399c571df32ba532c0ca67da9284985ac6a161822783ee873be1c66f48d14e0e":[9,0,0,0,22,11],
 "group__wsclose.html#ggae399c571df32ba532c0ca67da9284985acc9a317c70363dd88e823e066b2c73b7":[9,0,0,0,22,0],
-"group__wsclose.html#ggae399c571df32ba532c0ca67da9284985ad0869604d79e13700ae5d196a431b350":[7,17,0,11],
 "group__wsclose.html#ggae399c571df32ba532c0ca67da9284985ad0869604d79e13700ae5d196a431b350":[9,0,0,0,22,12],
-"group__wsclose.html#ggae399c571df32ba532c0ca67da9284985ad09e68295eabdddcba4e332fbea70ae5":[7,17,0,8],
+"group__wsclose.html#ggae399c571df32ba532c0ca67da9284985ad0869604d79e13700ae5d196a431b350":[7,17,0,11],
 "group__wsclose.html#ggae399c571df32ba532c0ca67da9284985ad09e68295eabdddcba4e332fbea70ae5":[9,0,0,0,22,9],
+"group__wsclose.html#ggae399c571df32ba532c0ca67da9284985ad09e68295eabdddcba4e332fbea70ae5":[7,17,0,8],
 "group__wsclose.html#ggae399c571df32ba532c0ca67da9284985ad2b477a91c8445bf34ecd43977f9b390":[7,17,0,12],
 "group__wsclose.html#ggae399c571df32ba532c0ca67da9284985ad2b477a91c8445bf34ecd43977f9b390":[9,0,0,0,22,13],
 "group__wsclose.html#ggae399c571df32ba532c0ca67da9284985af90cb98d983ad3d4c79df9b6f3d4a4d2":[9,0,0,0,22,5],
@@ -222,16 +222,16 @@ var NAVTREEINDEX2 =
 "group__wsstatus.html":[7,18],
 "group__wsstatus.html#ga08e9ee165fca503fd9427d55cfecac37":[9,0,0,0,105],
 "group__wsstatus.html#ga08e9ee165fca503fd9427d55cfecac37":[7,18,3],
-"group__wsstatus.html#ga26a140623d202dd2bf2004deb6994baa":[9,0,0,0,106],
 "group__wsstatus.html#ga26a140623d202dd2bf2004deb6994baa":[7,18,4],
+"group__wsstatus.html#ga26a140623d202dd2bf2004deb6994baa":[9,0,0,0,106],
 "group__wsstatus.html#ga2bb3655329b4651cd06f79ee3a764421":[7,18,6],
 "group__wsstatus.html#ga2bb3655329b4651cd06f79ee3a764421":[9,0,0,0,123],
-"group__wsstatus.html#ga3df5045656dfb6b0e63a38de2dca79d2":[9,0,0,0,91],
 "group__wsstatus.html#ga3df5045656dfb6b0e63a38de2dca79d2":[7,18,1],
-"group__wsstatus.html#ga4ad226d5e01024b4046f4a5a37199aa1":[7,18,2],
+"group__wsstatus.html#ga3df5045656dfb6b0e63a38de2dca79d2":[9,0,0,0,91],
 "group__wsstatus.html#ga4ad226d5e01024b4046f4a5a37199aa1":[9,0,0,0,104],
-"group__wsstatus.html#gaccd9c59336efad8af0554f79cc5966fd":[7,18,0],
+"group__wsstatus.html#ga4ad226d5e01024b4046f4a5a37199aa1":[7,18,2],
 "group__wsstatus.html#gaccd9c59336efad8af0554f79cc5966fd":[9,0,0,0,78],
+"group__wsstatus.html#gaccd9c59336efad8af0554f79cc5966fd":[7,18,0],
 "group__wsstatus.html#gaeca4afc94b1f026034f99cbba37e2f85":[7,18,5],
 "group__wsstatus.html#gaeca4afc94b1f026034f99cbba37e2f85":[9,0,0,0,114],
 "hierarchy.html":[8,2],
index 6acf7ad..5cc461f 100644 (file)
@@ -16,10 +16,90 @@ var NAVTREEINDEX3 =
 "libwebsockets_8h.html#aff42d53861afdc1a6edfb999ba688ecb":[9,0,0,0,10],
 "libwebsockets_8h_source.html":[9,0,0,0],
 "md_README.build.html":[1],
+"md_README.build.html#bu":[1,2],
+"md_README.build.html#build1":[1,1],
+"md_README.build.html#cm":[1,0],
+"md_README.build.html#cmco":[1,7],
+"md_README.build.html#cmcocl":[1,7,0],
+"md_README.build.html#cmcoug":[1,7,1],
+"md_README.build.html#cmcowg":[1,7,2],
+"md_README.build.html#cmq":[1,3],
+"md_README.build.html#cmw":[1,4],
+"md_README.build.html#cmwmgw":[1,5],
+"md_README.build.html#cross":[1,13],
+"md_README.build.html#cya":[1,10],
+"md_README.build.html#extplugins":[1,11],
+"md_README.build.html#http2rp":[1,12],
+"md_README.build.html#mbed3":[1,6],
+"md_README.build.html#mem":[1,14],
+"md_README.build.html#wolf":[1,8],
+"md_README.build.html#wolf1":[1,9],
 "md_README.coding.html":[3],
+"md_README.coding.html#clientasync":[3,13],
+"md_README.coding.html#closing":[3,5],
+"md_README.coding.html#conns":[3,1],
+"md_README.coding.html#cpp":[3,9],
+"md_README.coding.html#dae":[3,0],
+"md_README.coding.html#debuglog":[3,7],
+"md_README.coding.html#ecdh":[3,15],
+"md_README.coding.html#evtloop":[3,2],
+"md_README.coding.html#extopts":[3,18],
+"md_README.coding.html#extpoll":[3,8],
+"md_README.coding.html#fileapi":[3,14],
+"md_README.coding.html#frags":[3,6],
+"md_README.coding.html#headerinfo":[3,10],
+"md_README.coding.html#httpsclient":[3,19],
+"md_README.coding.html#ka":[3,11],
+"md_README.coding.html#libevuv":[3,17],
+"md_README.coding.html#mountcallback":[3,23],
+"md_README.coding.html#mounts":[3,22],
+"md_README.coding.html#otherwr":[3,4],
+"md_README.coding.html#smp":[3,16],
+"md_README.coding.html#sni":[3,21],
+"md_README.coding.html#sslopt":[3,12],
+"md_README.coding.html#vhosts":[3,20],
+"md_README.coding.html#writeable":[3,3],
 "md_README.generic-sessions.html":[4],
+"md_README.generic-sessions.html#gsap":[4,8],
+"md_README.generic-sessions.html#gsconf":[4,4],
+"md_README.generic-sessions.html#gseb":[4,0],
+"md_README.generic-sessions.html#gsi":[4,1],
+"md_README.generic-sessions.html#gsin":[4,2],
+"md_README.generic-sessions.html#gsof":[4,3],
+"md_README.generic-sessions.html#gsprep":[4,6],
+"md_README.generic-sessions.html#gspwc":[4,5],
+"md_README.generic-sessions.html#gsrmail":[4,7],
 "md_README.lwsws.html":[2],
+"md_README.lwsws.html#lwsws":[2,0],
+"md_README.lwsws.html#lwswsb":[2,1],
+"md_README.lwsws.html#lwswsc":[2,2],
+"md_README.lwsws.html#lwswslr":[2,13],
+"md_README.lwsws.html#lwswsm":[2,7],
+"md_README.lwsws.html#lwswsomo":[2,8],
+"md_README.lwsws.html#lwswsovo":[2,6],
+"md_README.lwsws.html#lwswspl":[2,9],
+"md_README.lwsws.html#lwswsplaplp":[2,10],
+"md_README.lwsws.html#lwswspr":[2,5],
+"md_README.lwsws.html#lwswsssp":[2,11],
+"md_README.lwsws.html#lwswssysd":[2,12],
+"md_README.lwsws.html#lwswsv":[2,3],
+"md_README.lwsws.html#lwswsvn":[2,4],
 "md_README.test-apps.html":[5],
+"md_README.test-apps.html#autobahn":[5,13],
+"md_README.test-apps.html#autobahnnotes":[5,14],
+"md_README.test-apps.html#choosingts":[5,4],
+"md_README.test-apps.html#echo":[5,5],
+"md_README.test-apps.html#latency":[5,12],
+"md_README.test-apps.html#sssl":[5,2],
+"md_README.test-apps.html#ta":[5,8],
+"md_README.test-apps.html#talog":[5,10],
+"md_README.test-apps.html#taping":[5,7],
+"md_README.test-apps.html#taproxy":[5,9],
+"md_README.test-apps.html#tassl":[5,6],
+"md_README.test-apps.html#tsb":[5,0],
+"md_README.test-apps.html#tsd":[5,1],
+"md_README.test-apps.html#ws13":[5,11],
+"md_README.test-apps.html#wscl":[5,3],
 "modules.html":[7],
 "pages.html":[],
 "structlws__cgi__args.html":[8,0,0],
@@ -169,55 +249,5 @@ var NAVTREEINDEX3 =
 "structlws__pollfd.html#ac393db6fc7fb6ed8fe7ca20936908ee9":[8,0,16,0],
 "structlws__pollfd.html#ae7cecfe7511c59d4a3a44f876d030932":[8,0,16,2],
 "structlws__process__html__args.html":[7,6,1,0],
-"structlws__process__html__args.html#a11859d8bedd379fbf64543b25c65fe14":[7,6,1,0,3],
-"structlws__process__html__args.html#a362547891ee0d693f3900a1f807ea475":[7,6,1,0,0],
-"structlws__process__html__args.html#a754513f2311241cabb0cd1c90d7307ef":[7,6,1,0,1],
-"structlws__process__html__args.html#a8be7fd396a1942ea2449a2fda990ff99":[7,6,1,0,2],
-"structlws__process__html__state.html":[7,6,1,1],
-"structlws__process__html__state.html#a3b113e00c03a2fded51b1c85ff5bf077":[7,6,1,1,6],
-"structlws__process__html__state.html#a53234f2948812c7208a256f9f5b23c20":[7,6,1,1,2],
-"structlws__process__html__state.html#a693d2fb45378afee5da29b539c1ea644":[7,6,1,1,3],
-"structlws__process__html__state.html#a71982bc1cbd8cf876ca0f545144404eb":[7,6,1,1,5],
-"structlws__process__html__state.html#adcafd17704775b4bbeea9561fb340968":[7,6,1,1,0],
-"structlws__process__html__state.html#af0732884ef891e24fe5fa237ebaa21a3":[7,6,1,1,4],
-"structlws__process__html__state.html#af21119890fdfebe28fb5c4dabfc1bdf5":[7,6,1,1,1],
-"structlws__protocol__vhost__options.html":[7,4,2],
-"structlws__protocol__vhost__options.html":[7,4,0,0],
-"structlws__protocol__vhost__options.html#a0640a92513c70ee6b9b295a9ad1658e7":[7,4,0,0,3],
-"structlws__protocol__vhost__options.html#a0640a92513c70ee6b9b295a9ad1658e7":[7,4,2,3],
-"structlws__protocol__vhost__options.html#abc714ddb4171756fc8196e9823a1e21c":[7,4,0,0,1],
-"structlws__protocol__vhost__options.html#abc714ddb4171756fc8196e9823a1e21c":[7,4,2,1],
-"structlws__protocol__vhost__options.html#acf9db77f8eb64cd4e314be9b43d8a8b9":[7,4,2,0],
-"structlws__protocol__vhost__options.html#acf9db77f8eb64cd4e314be9b43d8a8b9":[7,4,0,0,0],
-"structlws__protocol__vhost__options.html#afd99fbc90be51ea2465b550c2ec47822":[7,4,0,0,2],
-"structlws__protocol__vhost__options.html#afd99fbc90be51ea2465b550c2ec47822":[7,4,2,2],
-"structlws__protocols.html":[7,10,1],
-"structlws__protocols.html#a0d1d4996d81b2f5e125bcec981e461c5":[7,10,1,4],
-"structlws__protocols.html#a0e63edb457a613c3fa4271e0a8f19624":[7,10,1,2],
-"structlws__protocols.html#a3cbd903ad076736ae934a54cae36580e":[7,10,1,5],
-"structlws__protocols.html#a6b632018590c2b1bbe43fbab6d5e6fac":[7,10,1,1],
-"structlws__protocols.html#a9bbd85f591ffb4259711cb5acbb05bea":[7,10,1,3],
-"structlws__protocols.html#acabf94c1a9bfe7be0387fbb0e0c56b2d":[7,10,1,0],
-"structlws__session__info.html":[7,10,0,2],
-"structlws__session__info.html#a3d57a70b6e7181d95a8bec429b1a7697":[7,10,0,2,4],
-"structlws__session__info.html#a4353b5dd19400b2b15edfd7cee1e4cd5":[7,10,0,2,3],
-"structlws__session__info.html#a53eed02325e8717a53297391e3e98fac":[7,10,0,2,1],
-"structlws__session__info.html#a94b813cfc6b0da4b182659de30038ad3":[7,10,0,2,0],
-"structlws__session__info.html#afb924864b70f40372920688a5c1c895e":[7,10,0,2,2],
-"structlws__token__limits.html":[7,6,4,1],
-"structlws__token__limits.html#a6ec712306cbf8585bce7a56758a3ceff":[7,6,4,1,0],
-"structlws__tokens.html":[7,6,6],
-"structlws__tokens.html":[7,6,4,0],
-"structlws__tokens.html#a855b7375d1d58516c0ecd4b60e9a7766":[7,6,4,0,1],
-"structlws__tokens.html#a855b7375d1d58516c0ecd4b60e9a7766":[7,6,6,1],
-"structlws__tokens.html#a9f3635412bc71a5cb78e9862b55f10cd":[7,6,4,0,0],
-"structlws__tokens.html#a9f3635412bc71a5cb78e9862b55f10cd":[7,6,6,0],
-"structlwsgw__hash.html":[7,10,0,1],
-"structlwsgw__hash.html#a29435f5cf78747d4257695b0f141d164":[7,10,0,1,0],
-"structlwsgw__hash__bin.html":[7,10,0,0],
-"structlwsgw__hash__bin.html#ac92f50d9471058525d110597a4e0de6b":[7,10,0,0,0],
-"structpollfd.html":[8,0,26],
-"structpollfd.html#aafb457d11cac415faf0e1e2b825118c2":[8,0,26,2],
-"structpollfd.html#ac9b2f2c5b1f9a7487eb57e67cd4960ef":[8,0,26,0],
-"structpollfd.html#af084f089bdece61d177f85782d6673d0":[8,0,26,1]
+"structlws__process__html__args.html#a11859d8bedd379fbf64543b25c65fe14":[7,6,1,0,3]
 };
diff --git a/doc/html/navtreeindex4.js b/doc/html/navtreeindex4.js
new file mode 100644 (file)
index 0000000..e9af076
--- /dev/null
@@ -0,0 +1,53 @@
+var NAVTREEINDEX4 =
+{
+"structlws__process__html__args.html#a362547891ee0d693f3900a1f807ea475":[7,6,1,0,0],
+"structlws__process__html__args.html#a754513f2311241cabb0cd1c90d7307ef":[7,6,1,0,1],
+"structlws__process__html__args.html#a8be7fd396a1942ea2449a2fda990ff99":[7,6,1,0,2],
+"structlws__process__html__state.html":[7,6,1,1],
+"structlws__process__html__state.html#a3b113e00c03a2fded51b1c85ff5bf077":[7,6,1,1,6],
+"structlws__process__html__state.html#a53234f2948812c7208a256f9f5b23c20":[7,6,1,1,2],
+"structlws__process__html__state.html#a693d2fb45378afee5da29b539c1ea644":[7,6,1,1,3],
+"structlws__process__html__state.html#a71982bc1cbd8cf876ca0f545144404eb":[7,6,1,1,5],
+"structlws__process__html__state.html#adcafd17704775b4bbeea9561fb340968":[7,6,1,1,0],
+"structlws__process__html__state.html#af0732884ef891e24fe5fa237ebaa21a3":[7,6,1,1,4],
+"structlws__process__html__state.html#af21119890fdfebe28fb5c4dabfc1bdf5":[7,6,1,1,1],
+"structlws__protocol__vhost__options.html":[7,4,0,0],
+"structlws__protocol__vhost__options.html":[7,4,2],
+"structlws__protocol__vhost__options.html#a0640a92513c70ee6b9b295a9ad1658e7":[7,4,2,3],
+"structlws__protocol__vhost__options.html#a0640a92513c70ee6b9b295a9ad1658e7":[7,4,0,0,3],
+"structlws__protocol__vhost__options.html#abc714ddb4171756fc8196e9823a1e21c":[7,4,0,0,1],
+"structlws__protocol__vhost__options.html#abc714ddb4171756fc8196e9823a1e21c":[7,4,2,1],
+"structlws__protocol__vhost__options.html#acf9db77f8eb64cd4e314be9b43d8a8b9":[7,4,0,0,0],
+"structlws__protocol__vhost__options.html#acf9db77f8eb64cd4e314be9b43d8a8b9":[7,4,2,0],
+"structlws__protocol__vhost__options.html#afd99fbc90be51ea2465b550c2ec47822":[7,4,0,0,2],
+"structlws__protocol__vhost__options.html#afd99fbc90be51ea2465b550c2ec47822":[7,4,2,2],
+"structlws__protocols.html":[7,10,1],
+"structlws__protocols.html#a0d1d4996d81b2f5e125bcec981e461c5":[7,10,1,4],
+"structlws__protocols.html#a0e63edb457a613c3fa4271e0a8f19624":[7,10,1,2],
+"structlws__protocols.html#a3cbd903ad076736ae934a54cae36580e":[7,10,1,5],
+"structlws__protocols.html#a6b632018590c2b1bbe43fbab6d5e6fac":[7,10,1,1],
+"structlws__protocols.html#a9bbd85f591ffb4259711cb5acbb05bea":[7,10,1,3],
+"structlws__protocols.html#acabf94c1a9bfe7be0387fbb0e0c56b2d":[7,10,1,0],
+"structlws__session__info.html":[7,10,0,2],
+"structlws__session__info.html#a3d57a70b6e7181d95a8bec429b1a7697":[7,10,0,2,4],
+"structlws__session__info.html#a4353b5dd19400b2b15edfd7cee1e4cd5":[7,10,0,2,3],
+"structlws__session__info.html#a53eed02325e8717a53297391e3e98fac":[7,10,0,2,1],
+"structlws__session__info.html#a94b813cfc6b0da4b182659de30038ad3":[7,10,0,2,0],
+"structlws__session__info.html#afb924864b70f40372920688a5c1c895e":[7,10,0,2,2],
+"structlws__token__limits.html":[7,6,4,1],
+"structlws__token__limits.html#a6ec712306cbf8585bce7a56758a3ceff":[7,6,4,1,0],
+"structlws__tokens.html":[7,6,6],
+"structlws__tokens.html":[7,6,4,0],
+"structlws__tokens.html#a855b7375d1d58516c0ecd4b60e9a7766":[7,6,6,1],
+"structlws__tokens.html#a855b7375d1d58516c0ecd4b60e9a7766":[7,6,4,0,1],
+"structlws__tokens.html#a9f3635412bc71a5cb78e9862b55f10cd":[7,6,6,0],
+"structlws__tokens.html#a9f3635412bc71a5cb78e9862b55f10cd":[7,6,4,0,0],
+"structlwsgw__hash.html":[7,10,0,1],
+"structlwsgw__hash.html#a29435f5cf78747d4257695b0f141d164":[7,10,0,1,0],
+"structlwsgw__hash__bin.html":[7,10,0,0],
+"structlwsgw__hash__bin.html#ac92f50d9471058525d110597a4e0de6b":[7,10,0,0,0],
+"structpollfd.html":[8,0,26],
+"structpollfd.html#aafb457d11cac415faf0e1e2b825118c2":[8,0,26,2],
+"structpollfd.html#ac9b2f2c5b1f9a7487eb57e67cd4960ef":[8,0,26,0],
+"structpollfd.html#af084f089bdece61d177f85782d6673d0":[8,0,26,1]
+};
index 560c5e3..0293700 100644 (file)
@@ -1,5 +1,4 @@
-\subsection*{Introduction to C\+Make }
-
+\hypertarget{md_README.build_cm}{}\section{Introduction to C\+Make}\label{md_README.build_cm}
 C\+Make is a multi-\/platform build tool that can generate build files for many different target platforms. See more info at \href{http://www.cmake.org}{\tt http\+://www.\+cmake.\+org}
 
 C\+Make also allows/recommends you to do \char`\"{}out of source\char`\"{}-\/builds, that is, the build files are separated from your sources, so there is no need to create elaborate clean scripts to get a clean source tree, instead you simply remove your build directory.
@@ -13,16 +12,10 @@ Libwebsockets has been tested to build successfully on the following platforms w
 \item Linux (x86 and A\+RM)
 \item O\+SX
 \item Net\+B\+SD
-\end{DoxyItemize}
-
-\subsection*{Building the library and test apps }
-
+\end{DoxyItemize}\hypertarget{md_README.build_build1}{}\section{Building the library and test apps}\label{md_README.build_build1}
 The project settings used by C\+Make to generate the platform specific build files is called \href{CMakeLists.txt}{\tt C\+Make\+Lists.\+txt}. C\+Make then uses one of its \char`\"{}\+Generators\char`\"{} to output a Visual Studio project or Make file for instance. To see a list of the available generators for your platform, simply run the \char`\"{}cmake\char`\"{} command.
 
-Note that by default Open\+S\+SL will be linked, if you don\textquotesingle{}t want S\+SL support see below on how to toggle compile options.
-
-\subsection*{Building on Unix\+: }
-
+Note that by default Open\+S\+SL will be linked, if you don\textquotesingle{}t want S\+SL support see below on how to toggle compile options.\hypertarget{md_README.build_bu}{}\section{Building on Unix\+:}\label{md_README.build_bu}
 
 \begin{DoxyEnumerate}
 \item Install C\+Make 2.\+8 or greater\+: \href{http://cmake.org/cmake/resources/software.html}{\tt http\+://cmake.\+org/cmake/resources/software.\+html} (Most Unix distributions comes with a packaged version also)
@@ -79,14 +72,8 @@ To get it to build on latest openssl (2016-\/04-\/10) it needed this approach
 \begin{DoxyCode}
 1 $ cmake .. -DCMAKE\_BUILD\_TYPE=DEBUG
 \end{DoxyCode}
-
-
-\subsection*{Quirk of cmake }
-
-When changing cmake options, for some reason the only way to get it to see the changes sometimes is delete the contents of your build directory and do the cmake from scratch.
-
-\subsection*{Building on Windows (Visual Studio) }
-
+\hypertarget{md_README.build_cmq}{}\section{Quirk of cmake}\label{md_README.build_cmq}
+When changing cmake options, for some reason the only way to get it to see the changes sometimes is delete the contents of your build directory and do the cmake from scratch.\hypertarget{md_README.build_cmw}{}\section{Building on Windows (\+Visual Studio)}\label{md_README.build_cmw}
 
 \begin{DoxyEnumerate}
 \item Install C\+Make 2.\+6 or greater\+: \href{http://cmake.org/cmake/resources/software.html}{\tt http\+://cmake.\+org/cmake/resources/software.\+html}
@@ -121,10 +108,7 @@ When changing cmake options, for some reason the only way to get it to see the c
 \item userenv.\+lib
 \end{DoxyItemize}
 \item If you\textquotesingle{}re using libuv, you must make sure to compile libuv with the same multithread-\/dll / Mtd attributes as libwebsockets itself
-\end{DoxyEnumerate}
-
-\subsection*{Building on Windows (Min\+GW) }
-
+\end{DoxyEnumerate}\hypertarget{md_README.build_cmwmgw}{}\section{Building on Windows (\+Min\+G\+W)}\label{md_README.build_cmwmgw}
 
 \begin{DoxyEnumerate}
 \item Install Min\+GW\+: \href{http://sourceforge.net/projects/mingw/files}{\tt http\+://sourceforge.\+net/projects/mingw/files}
@@ -179,24 +163,7 @@ a) Add the following lines to C\+:.h\+:
 1 $ make
 2 $ make install
 \end{DoxyCode}
-
-
-\subsection*{Setting compile options }
-
-To set compile time flags you can either use one of the C\+Make gui applications or do it via command line.
-
-\subsection*{Command line }
-
-To list avaialable options (ommit the H if you don\textquotesingle{}t want the help text)\+: \begin{DoxyVerb}    cmake -LH ..
-\end{DoxyVerb}
-
-
-Then to set an option and build (for example turn off S\+SL support)\+: \begin{DoxyVerb}    cmake -DLWS_WITH_SSL=0 ..
-\end{DoxyVerb}
- or cmake -\/\+D\+L\+W\+S\+\_\+\+W\+I\+T\+H\+\_\+\+S\+SL\+:B\+O\+OL=O\+FF ..
-
-\subsection*{Building on mbed3 }
-
+\hypertarget{md_README.build_mbed3}{}\section{Building on mbed3}\label{md_README.build_mbed3}
 M\+B\+E\+D3 is a non-\/posix embedded OS targeted on Cortex M class chips.
 
 \href{https://www.mbed.com/}{\tt https\+://www.\+mbed.\+com/}
@@ -229,28 +196,24 @@ and cd into it
 
 7) yotta install
 
-8) yotta build
+8) yotta build\hypertarget{md_README.build_cmco}{}\section{Setting compile options}\label{md_README.build_cmco}
+To set compile time flags you can either use one of the C\+Make gui applications or do it via command line.\hypertarget{md_README.build_cmcocl}{}\subsection{Command line}\label{md_README.build_cmcocl}
+To list avaialable options (omit the H if you don\textquotesingle{}t want the help text)\+: \begin{DoxyVerb}    cmake -LH ..
+\end{DoxyVerb}
 
-\subsection*{Unix G\+UI }
 
+Then to set an option and build (for example turn off S\+SL support)\+: \begin{DoxyVerb}    cmake -DLWS_WITH_SSL=0 ..
+\end{DoxyVerb}
+ or cmake -\/\+D\+L\+W\+S\+\_\+\+W\+I\+T\+H\+\_\+\+S\+SL\+:B\+O\+OL=O\+FF ..\hypertarget{md_README.build_cmcoug}{}\subsection{Unix G\+UI}\label{md_README.build_cmcoug}
 If you have a curses-\/enabled build you simply type\+: (not all packages include this, my debian install does not for example). \begin{DoxyVerb}    ccmake
 \end{DoxyVerb}
-
-
-\subsection*{Windows G\+UI }
-
-On windows C\+Make comes with a gui application\+: Start -\/$>$ Programs -\/$>$ C\+Make -\/$>$ C\+Make (cmake-\/gui)
-
-\subsection*{wolf\+S\+S\+L/\+Cya\+S\+SL replacement for Open\+S\+SL }
-
+\hypertarget{md_README.build_cmcowg}{}\subsection{Windows G\+UI}\label{md_README.build_cmcowg}
+On windows C\+Make comes with a gui application\+: Start -\/$>$ Programs -\/$>$ C\+Make -\/$>$ C\+Make (cmake-\/gui)\hypertarget{md_README.build_wolf}{}\section{wolf\+S\+S\+L/\+Cya\+S\+S\+L replacement for Open\+S\+SL}\label{md_README.build_wolf}
 wolf\+S\+S\+L/\+Cya\+S\+SL is a lightweight S\+SL library targeted at embedded systems\+: \href{https://www.wolfssl.com/wolfSSL/Products-wolfssl.html}{\tt https\+://www.\+wolfssl.\+com/wolf\+S\+S\+L/\+Products-\/wolfssl.\+html}
 
 It contains a Open\+S\+SL compatibility layer which makes it possible to pretty much link to it instead of Open\+S\+SL, giving a much smaller footprint.
 
-{\bfseries N\+O\+TE}\+: wolfssl needs to be compiled using the {\ttfamily -\/-\/enable-\/opensslextra} flag for this to work.
-
-\subsection*{Compiling libwebsockets with wolf\+S\+SL }
-
+{\bfseries N\+O\+TE}\+: wolfssl needs to be compiled using the {\ttfamily -\/-\/enable-\/opensslextra} flag for this to work.\hypertarget{md_README.build_wolf1}{}\section{Compiling libwebsockets with wolf\+S\+SL}\label{md_README.build_wolf1}
 
 \begin{DoxyCode}
 1 cmake .. -DLWS\_USE\_WOLFSSL=1 \(\backslash\)
@@ -259,10 +222,7 @@ It contains a Open\+S\+SL compatibility layer which makes it possible to pretty
 \end{DoxyCode}
 
 
-{\bfseries N\+O\+TE}\+: On windows use the .lib file extension for {\ttfamily L\+W\+S\+\_\+\+W\+O\+L\+F\+S\+S\+L\+\_\+\+L\+I\+B\+R\+A\+R\+I\+ES} instead.
-
-\subsection*{Compiling libwebsockets with Cya\+S\+SL }
-
+{\bfseries N\+O\+TE}\+: On windows use the .lib file extension for {\ttfamily L\+W\+S\+\_\+\+W\+O\+L\+F\+S\+S\+L\+\_\+\+L\+I\+B\+R\+A\+R\+I\+ES} instead.\hypertarget{md_README.build_cya}{}\section{Compiling libwebsockets with Cya\+S\+SL}\label{md_README.build_cya}
 
 \begin{DoxyCode}
 1 cmake .. -DLWS\_USE\_CYASSL=1 \(\backslash\)
@@ -271,21 +231,7 @@ It contains a Open\+S\+SL compatibility layer which makes it possible to pretty
 \end{DoxyCode}
 
 
-{\bfseries N\+O\+TE}\+: On windows use the .lib file extension for {\ttfamily L\+W\+S\+\_\+\+C\+Y\+A\+S\+S\+L\+\_\+\+L\+I\+B\+R\+A\+R\+I\+ES} instead.
-
-\subsection*{Compiling libwebsockets with Polar\+S\+SL }
-
-Caution... at some point Polar\+S\+SL became Mbed\+T\+LS. But it did not happen all at once. The name changed first then at mbed\+T\+LS 2.\+0 the apis changed. So eg in Fedora 22, there is an \char`\"{}mbedtls\char`\"{} package which is actually using polarssl for the include dir and polarssl apis... this should be treated as polarssl then.
-
-Example config for this case is 
-\begin{DoxyCode}
-1 cmake .. -DLWS\_USE\_POLARSSL=1 -DLWS\_POLARSSL\_LIBRARIES=/usr/lib64/libmbedtls.so \(\backslash\)
-2          -DLWS\_POLARSSL\_INCLUDE\_DIRS=/usr/include/polarssl/
-\end{DoxyCode}
-
-
-\subsection*{Building plugins outside of lws itself }
-
+{\bfseries N\+O\+TE}\+: On windows use the .lib file extension for {\ttfamily L\+W\+S\+\_\+\+C\+Y\+A\+S\+S\+L\+\_\+\+L\+I\+B\+R\+A\+R\+I\+ES} instead.\hypertarget{md_README.build_extplugins}{}\section{Building plugins outside of lws itself}\label{md_README.build_extplugins}
 The directory ./plugin-\/standalone/ shows how easy it is to create plugins outside of lws itself. First build lws itself with -\/\+D\+L\+W\+S\+\_\+\+W\+I\+T\+H\+\_\+\+P\+L\+U\+G\+I\+NS, then use the same flow to build the standalone plugin 
 \begin{DoxyCode}
 1 cd ./plugin-standalone
@@ -307,10 +253,7 @@ Otherwise if you run lwsws or libwebsockets-\/test-\/server-\/v2.\+0, it will no
 5 lwsts[21257]:    libprotocol\_lws\_server\_status.so
 6 lwsts[21257]:    libprotocol\_lws\_status.so
 \end{DoxyCode}
- If you have multiple vhosts, you must enable plugins at the vhost additionally, discovered plugins are not enabled automatically for security reasons. You do this using info-\/$>$pvo or for lwsws, in the J\+S\+ON config.
-
-\subsection*{Reproducing H\+T\+T\+P2.\+0 tests }
-
+ If you have multiple vhosts, you must enable plugins at the vhost additionally, discovered plugins are not enabled automatically for security reasons. You do this using info-\/$>$pvo or for lwsws, in the J\+S\+ON config.\hypertarget{md_README.build_http2rp}{}\section{Reproducing H\+T\+T\+P2.\+0 tests}\label{md_README.build_http2rp}
 You must have built and be running lws against a version of openssl that has A\+L\+PN / N\+PN. Most distros still have older versions. You\textquotesingle{}ll know it\textquotesingle{}s right by seeing 
 \begin{DoxyCode}
 1 lwsts[4752]:  Compiled with OpenSSL support
@@ -327,10 +270,7 @@ For non-\/\+S\+SL H\+T\+T\+P2.\+0 upgrade
 \begin{DoxyCode}
 1 $ nghttp -nvas https://localhost:7681/test.html
 \end{DoxyCode}
-
-
-\subsection*{Cross compiling }
-
+\hypertarget{md_README.build_cross}{}\section{Cross compiling}\label{md_README.build_cross}
 To enable cross-\/compiling {\bfseries libwebsockets} using C\+Make you need to create a \char`\"{}\+Toolchain file\char`\"{} that you supply to C\+Make when generating your build files. C\+Make will then use the cross compilers and build paths specified in this file to look for dependencies and such.
 
 {\bfseries Libwebsockets} includes an example toolchain file \href{cross-arm-linux-gnueabihf.cmake}{\tt cross-\/arm-\/linux-\/gnueabihf.\+cmake} you can use as a starting point.
@@ -345,10 +285,7 @@ The commandline to configure for cross with this would look like
 
 {\bfseries N\+O\+TE}\+: start from an E\+M\+P\+TY build directory if you had a non-\/cross build in there before the settings will be cached and your changes ignored.
 
-Additional information on cross compilation with C\+Make\+: \href{http://www.vtk.org/Wiki/CMake_Cross_Compiling}{\tt http\+://www.\+vtk.\+org/\+Wiki/\+C\+Make\+\_\+\+Cross\+\_\+\+Compiling}
-
-\subsection*{Memory efficiency }
-
+Additional information on cross compilation with C\+Make\+: \href{http://www.vtk.org/Wiki/CMake_Cross_Compiling}{\tt http\+://www.\+vtk.\+org/\+Wiki/\+C\+Make\+\_\+\+Cross\+\_\+\+Compiling}\hypertarget{md_README.build_mem}{}\section{Memory efficiency}\label{md_README.build_mem}
 Embedded server-\/only configuration without extensions (ie, no compression on websocket connections), but with full v13 websocket features and http server, built on A\+RM Cortex-\/\+A9\+:
 
 Update at 8dac94d (2013-\/02-\/18) 
index db1a453..015c0b2 100644 (file)
@@ -1,16 +1,11 @@
-\subsection*{Daemonization }
-
+\hypertarget{md_README.coding_dae}{}\section{Daemonization}\label{md_README.coding_dae}
 There\textquotesingle{}s a helper api {\ttfamily lws\+\_\+daemonize} built by default that does everything you need to daemonize well, including creating a lock file. If you\textquotesingle{}re making what\textquotesingle{}s basically a daemon, just call this early in your init to fork to a headless background process and exit the starting process.
 
-Notice stdout, stderr, stdin are all redirected to /dev/null to enforce your daemon is headless, so you\textquotesingle{}ll need to sort out alternative logging, by, eg, syslog.
-
-\subsection*{Maximum number of connections }
-
+Notice stdout, stderr, stdin are all redirected to /dev/null to enforce your daemon is headless, so you\textquotesingle{}ll need to sort out alternative logging, by, eg, syslog.\hypertarget{md_README.coding_conns}{}\section{Maximum number of connections}\label{md_README.coding_conns}
 The maximum number of connections the library can deal with is decided when it starts by querying the OS to find out how many file descriptors it is allowed to open (1024 on Fedora for example). It then allocates arrays that allow up to that many connections, minus whatever other file descriptors are in use by the user code.
 
-If you want to restrict that allocation, or increase it, you can use ulimit or similar to change the avaiable number of file descriptors, and when restarted {\bfseries libwebsockets} will adapt accordingly.
-
-\subsection*{Libwebsockets is singlethreaded }
+If you want to restrict that allocation, or increase it, you can use ulimit or similar to change the avaiable number of file descriptors, and when restarted {\bfseries libwebsockets} will adapt accordingly.\hypertarget{md_README.coding_evtloop}{}\section{Libwebsockets is singlethreaded}\label{md_README.coding_evtloop}
+Libwebsockets works in a serialized event loop, in a single thread.
 
 Directly performing websocket actions from other threads is not allowed. Aside from the internal data being inconsistent in {\ttfamily forked()} processes, the scope of a {\ttfamily wsi} ({\ttfamily struct websocket}) can end at any time during service with the socket closing and the {\ttfamily wsi} freed.
 
@@ -32,10 +27,7 @@ If you need to service other socket or file descriptors as well as the websocket
 
 If you insist on trying to use it from multiple threads, take special care if you might simultaneously create more than one context from different threads.
 
-S\+S\+L\+\_\+library\+\_\+init() is called from the context create api and it also is not reentrant. So at least create the contexts sequentially.
-
-\subsection*{Only send data when socket writeable }
-
+S\+S\+L\+\_\+library\+\_\+init() is called from the context create api and it also is not reentrant. So at least create the contexts sequentially.\hypertarget{md_README.coding_writeable}{}\section{Only send data when socket writeable}\label{md_README.coding_writeable}
 You should only send data on a websocket connection from the user callback {\ttfamily L\+W\+S\+\_\+\+C\+A\+L\+L\+B\+A\+C\+K\+\_\+\+S\+E\+R\+V\+E\+R\+\_\+\+W\+R\+I\+T\+E\+A\+B\+LE} (or {\ttfamily L\+W\+S\+\_\+\+C\+A\+L\+L\+B\+A\+C\+K\+\_\+\+C\+L\+I\+E\+N\+T\+\_\+\+W\+R\+I\+T\+E\+A\+B\+LE} for clients).
 
 If you want to send something, do not just send it but request a callback when the socket is writeable using
@@ -48,28 +40,19 @@ If you want to send something, do not just send it but request a callback when t
 
 Usually you will get called back immediately next time around the service loop, but if your peer is slow or temporarily inactive the callback will be delayed accordingly. Generating what to write and sending it should be done in the ...W\+R\+I\+T\+E\+A\+B\+LE callback.
 
-See the test server code for an example of how to do this.
-
-\subsection*{Do not rely on only your own W\+R\+I\+T\+E\+A\+B\+LE requests appearing }
-
+See the test server code for an example of how to do this.\hypertarget{md_README.coding_otherwr}{}\section{Do not rely on only your own W\+R\+I\+T\+E\+A\+B\+L\+E requests appearing}\label{md_README.coding_otherwr}
 Libwebsockets may generate additional {\ttfamily L\+W\+S\+\_\+\+C\+A\+L\+L\+B\+A\+C\+K\+\_\+\+C\+L\+I\+E\+N\+T\+\_\+\+W\+R\+I\+T\+E\+A\+B\+LE} events if it met network conditions where it had to buffer your send data internally.
 
 So your code for {\ttfamily L\+W\+S\+\_\+\+C\+A\+L\+L\+B\+A\+C\+K\+\_\+\+C\+L\+I\+E\+N\+T\+\_\+\+W\+R\+I\+T\+E\+A\+B\+LE} needs to own the decision about what to send, it can\textquotesingle{}t assume that just because the writeable callback came it really is time to send something.
 
-It\textquotesingle{}s quite possible you get an \textquotesingle{}extra\textquotesingle{} writeable callback at any time and just need to {\ttfamily return 0} and wait for the expected callback later.
-
-\subsection*{Closing connections from the user side }
-
+It\textquotesingle{}s quite possible you get an \textquotesingle{}extra\textquotesingle{} writeable callback at any time and just need to {\ttfamily return 0} and wait for the expected callback later.\hypertarget{md_README.coding_closing}{}\section{Closing connections from the user side}\label{md_README.coding_closing}
 When you want to close a connection, you do it by returning {\ttfamily -\/1} from a callback for that connection.
 
 You can provoke a callback by calling {\ttfamily lws\+\_\+callback\+\_\+on\+\_\+writable} on the wsi, then notice in the callback you want to close it and just return -\/1. But usually, the decision to close is made in a callback already and returning -\/1 is simple.
 
 If the socket knows the connection is dead, because the peer closed or there was an affirmitive network error like a F\+IN coming, then {\bfseries libwebsockets} will take care of closing the connection automatically.
 
-If you have a silently dead connection, it\textquotesingle{}s possible to enter a state where the send pipe on the connection is choked but no ack will ever come, so the dead connection will never become writeable. To cover that, you can use T\+CP keepalives (see later in this document)
-
-\subsection*{Fragmented messages }
-
+If you have a silently dead connection, it\textquotesingle{}s possible to enter a state where the send pipe on the connection is choked but no ack will ever come, so the dead connection will never become writeable. To cover that, you can use T\+CP keepalives (see later in this document) or pings.\hypertarget{md_README.coding_frags}{}\section{Fragmented messages}\label{md_README.coding_frags}
 To support fragmented messages you need to check for the final frame of a message with {\ttfamily lws\+\_\+is\+\_\+final\+\_\+fragment}. This check can be combined with {\ttfamily libwebsockets\+\_\+remaining\+\_\+packet\+\_\+payload} to gather the whole contents of a message, eg\+:
 
 
@@ -95,10 +78,7 @@ To support fragmented messages you need to check for the final frame of a messag
 \end{DoxyCode}
 
 
-The test app libwebsockets-\/test-\/fraggle sources also show how to deal with fragmented messages.
-
-\subsection*{Debug Logging }
-
+The test app libwebsockets-\/test-\/fraggle sources also show how to deal with fragmented messages.\hypertarget{md_README.coding_debuglog}{}\section{Debug Logging}\label{md_README.coding_debuglog}
 Also using {\ttfamily lws\+\_\+set\+\_\+log\+\_\+level} api you may provide a custom callback to actually emit the log string. By default, this points to an internal emit function that sends to stderr. Setting it to {\ttfamily N\+U\+LL} leaves it as it is instead.
 
 A helper function {\ttfamily \hyperlink{group__log_gab7c0fc936cc9f1eb58e2bb234c15147c}{lwsl\+\_\+emit\+\_\+syslog()}} is exported from the library to simplify logging to syslog. You still need to use {\ttfamily setlogmask}, {\ttfamily openlog} and {\ttfamily closelog} in your user code.
@@ -116,8 +96,15 @@ The logging apis are made available for user code.
 
 The difference between notice and info is that notice will be logged by default whereas info is ignored by default.
 
-\subsection*{External Polling Loop support }
+If you are not building with \+\_\+\+D\+E\+B\+UG defined, ie, without this
 
+
+\begin{DoxyCode}
+1 $ cmake .. -DCMAKE\_BUILD\_TYPE=DEBUG
+\end{DoxyCode}
+
+
+then log levels below notice do not actually get compiled in.\hypertarget{md_README.coding_extpoll}{}\section{External Polling Loop support}\label{md_README.coding_extpoll}
 {\bfseries libwebsockets} maintains an internal {\ttfamily poll()} array for all of its sockets, but you can instead integrate the sockets into an external polling array. That\textquotesingle{}s needed if {\bfseries libwebsockets} will cooperate with an existing poll array maintained by another server.
 
 Four callbacks {\ttfamily L\+W\+S\+\_\+\+C\+A\+L\+L\+B\+A\+C\+K\+\_\+\+A\+D\+D\+\_\+\+P\+O\+L\+L\+\_\+\+FD}, {\ttfamily L\+W\+S\+\_\+\+C\+A\+L\+L\+B\+A\+C\+K\+\_\+\+D\+E\+L\+\_\+\+P\+O\+L\+L\+\_\+\+FD}, {\ttfamily L\+W\+S\+\_\+\+C\+A\+L\+L\+B\+A\+C\+K\+\_\+\+S\+E\+T\+\_\+\+M\+O\+D\+E\+\_\+\+P\+O\+L\+L\+\_\+\+FD} and {\ttfamily L\+W\+S\+\_\+\+C\+A\+L\+L\+B\+A\+C\+K\+\_\+\+C\+L\+E\+A\+R\+\_\+\+M\+O\+D\+E\+\_\+\+P\+O\+L\+L\+\_\+\+FD} appear in the callback for protocol 0 and allow interface code to manage socket descriptors in other poll loops.
@@ -133,10 +120,7 @@ Also note that when integrating a foreign event loop like libev or libuv where i
 \item be sure you set .events to .revents value as well in the synthesized pollfd
 \item check the built-\/in support for the event loop if possible (eg, ./lib/libuv.c) to see how it interfaces to lws
 \item use L\+W\+S\+\_\+\+P\+O\+L\+L\+H\+UP / L\+W\+S\+\_\+\+P\+O\+L\+L\+IN / L\+W\+S\+\_\+\+P\+O\+L\+L\+O\+UT from \hyperlink{libwebsockets_8h}{libwebsockets.\+h} to avoid losing windows compatibility
-\end{DoxyItemize}
-
-\subsection*{Using with in c++ apps }
-
+\end{DoxyItemize}\hypertarget{md_README.coding_cpp}{}\section{Using with in c++ apps}\label{md_README.coding_cpp}
 The library is ready for use by C++ apps. You can get started quickly by copying the test server
 
 
@@ -153,14 +137,12 @@ and building it in C++ like this
 \end{DoxyCode}
 
 
-{\ttfamily I\+N\+S\+T\+A\+L\+L\+\_\+\+D\+A\+T\+A\+D\+IR} is only needed because the test server uses it as shipped, if you remove the references to it in your app you don\textquotesingle{}t need to define it on the g++ line either.
+{\ttfamily I\+N\+S\+T\+A\+L\+L\+\_\+\+D\+A\+T\+A\+D\+IR} is only needed because the test server uses it as shipped, if you remove the references to it in your app you don\textquotesingle{}t need to define it on the g++ line either.\hypertarget{md_README.coding_headerinfo}{}\section{Availability of header information}\label{md_README.coding_headerinfo}
+H\+T\+TP Header information is managed by a pool of \char`\"{}ah\char`\"{} structs. These are a limited resource so there is pressure to free the headers and return the ah to the pool for reuse.
 
-\subsection*{Availability of header information }
-
-From v1.\+2 of the library onwards, the H\+T\+TP header content is {\ttfamily free()}d as soon as the websocket connection is established. For websocket servers, you can copy interesting headers by handling {\ttfamily L\+W\+S\+\_\+\+C\+A\+L\+L\+B\+A\+C\+K\+\_\+\+F\+I\+L\+T\+E\+R\+\_\+\+P\+R\+O\+T\+O\+C\+O\+L\+\_\+\+C\+O\+N\+N\+E\+C\+T\+I\+ON} callback, for clients there\textquotesingle{}s a new callback just for this purpose {\ttfamily L\+W\+S\+\_\+\+C\+A\+L\+L\+B\+A\+C\+K\+\_\+\+C\+L\+I\+E\+N\+T\+\_\+\+F\+I\+L\+T\+E\+R\+\_\+\+P\+R\+E\+\_\+\+E\+S\+T\+A\+B\+L\+I\+SH}.
-
-\subsection*{T\+CP Keepalive }
+For that reason header information on H\+T\+TP connections that get upgraded to websockets is lost after the E\+S\+T\+A\+B\+L\+I\+S\+H\+ED callback. Anything important that isn\textquotesingle{}t processed by user code before then should be copied out for later.
 
+For H\+T\+TP connections that don\textquotesingle{}t upgrade, header info remains available the whole time.\hypertarget{md_README.coding_ka}{}\section{T\+C\+P Keepalive}\label{md_README.coding_ka}
 It is possible for a connection which is not being used to send to die silently somewhere between the peer and the side not sending. In this case by default T\+CP will just not report anything and you will never get any more incoming data or sign the link is dead until you try to send.
 
 To deal with getting a notification of that situation, you can choose to enable T\+CP keepalives on all {\bfseries libwebsockets} sockets, when you create the context.
@@ -169,10 +151,7 @@ To enable keepalive, set the ka\+\_\+time member of the context creation paramet
 
 With keepalive enabled, the T\+CP layer will send control packets that should stimulate a response from the peer without affecting link traffic. If the response is not coming, the socket will announce an error at {\ttfamily poll()} forcing a close.
 
-Note that B\+S\+Ds don\textquotesingle{}t support keepalive time / probes / interval per-\/socket like Linux does. On those systems you can enable keepalive by a nonzero value in {\ttfamily ka\+\_\+time}, but the systemwide kernel settings for the time / probes/ interval are used, regardless of what nonzero value is in {\ttfamily ka\+\_\+time}.
-
-\subsection*{Optimizing S\+SL connections }
-
+Note that B\+S\+Ds don\textquotesingle{}t support keepalive time / probes / interval per-\/socket like Linux does. On those systems you can enable keepalive by a nonzero value in {\ttfamily ka\+\_\+time}, but the systemwide kernel settings for the time / probes/ interval are used, regardless of what nonzero value is in {\ttfamily ka\+\_\+time}.\hypertarget{md_README.coding_sslopt}{}\section{Optimizing S\+S\+L connections}\label{md_README.coding_sslopt}
 There\textquotesingle{}s a member {\ttfamily ssl\+\_\+cipher\+\_\+list} in the {\ttfamily \hyperlink{structlws__context__creation__info}{lws\+\_\+context\+\_\+creation\+\_\+info}} struct which allows the user code to restrict the possible cipher selection at context-\/creation time.
 
 You might want to look into that to stop the ssl peers selecting a cipher which is too computationally expensive. To use it, point it to a string like \begin{DoxyVerb}    `"RC4-MD5:RC4-SHA:AES128-SHA:AES256-SHA:HIGH:!DSS:!aNULL"`
@@ -181,10 +160,7 @@ You might want to look into that to stop the ssl peers selecting a cipher which
 
 if left {\ttfamily N\+U\+LL}, then the \char`\"{}\+D\+E\+F\+A\+U\+L\+T\char`\"{} set of ciphers are all possible to select.
 
-You can also set it to {\ttfamily \char`\"{}\+A\+L\+L\char`\"{}} to allow everything (including insecure ciphers).
-
-\subsection*{Async nature of client connections }
-
+You can also set it to {\ttfamily \char`\"{}\+A\+L\+L\char`\"{}} to allow everything (including insecure ciphers).\hypertarget{md_README.coding_clientasync}{}\section{Async nature of client connections}\label{md_README.coding_clientasync}
 When you call {\ttfamily \hyperlink{structlws__client__connect__info}{lws\+\_\+client\+\_\+connect\+\_\+info}(..)} and get a {\ttfamily wsi} back, it does not mean your connection is active. It just means it started trying to connect.
 
 Your client connection is actually active only when you receive {\ttfamily L\+W\+S\+\_\+\+C\+A\+L\+L\+B\+A\+C\+K\+\_\+\+C\+L\+I\+E\+N\+T\+\_\+\+E\+S\+T\+A\+B\+L\+I\+S\+H\+ED} for it.
@@ -195,8 +171,9 @@ After attempting the connection and getting back a non-\/{\ttfamily N\+U\+LL} {\
 
 As usual, see \href{test-server/test-client.c}{\tt test-\/client.\+c} for example code.
 
-\subsection*{Lws platform-\/independent file access apis }
+Notice that the client connection api tries to progress the connection somewhat before returning. That means it\textquotesingle{}s possible to get callbacks like C\+O\+N\+N\+E\+C\+T\+I\+O\+N\+\_\+\+E\+R\+R\+OR on the new connection before your user code had a chance to get the wsi returned to identify it (in fact if the connection did fail early, N\+U\+LL will be returned instead of the wsi anyway).
 
+To avoid that problem, you can fill in {\ttfamily pwsi} in the client connection info struct to point to a struct lws that get filled in early by the client connection api with the related wsi. You can then check for that in the callback to confirm the identity of the failing client connection.\hypertarget{md_README.coding_fileapi}{}\section{Lws platform-\/independent file access apis}\label{md_README.coding_fileapi}
 lws now exposes his internal platform file abstraction in a way that can be both used by user code to make it platform-\/agnostic, and be overridden or subclassed by user code. This allows things like handling the U\+RI \char`\"{}directory
 space\char`\"{} as a virtual filesystem that may or may not be backed by a regular filesystem. One example use is serving files from inside large compressed archive storage without having to unpack anything except the file being requested.
 
@@ -234,10 +211,7 @@ and then can use helpers to also leverage these platform-\/independent file hand
 \end{DoxyCode}
 
 
-The user code can also override or subclass the file operations, to either wrap or replace them. An example is shown in test server.
-
-\subsection*{E\+C\+DH Support }
-
+The user code can also override or subclass the file operations, to either wrap or replace them. An example is shown in test server.\hypertarget{md_README.coding_ecdh}{}\section{E\+C\+D\+H Support}\label{md_README.coding_ecdh}
 E\+C\+DH Certs are now supported. Enable the C\+Make option \begin{DoxyVerb}    cmake .. -DLWS_SSL_SERVER_WITH_ECDH_CERT=1 
 \end{DoxyVerb}
 
@@ -246,10 +220,7 @@ E\+C\+DH Certs are now supported. Enable the C\+Make option \begin{DoxyVerb}
 \end{DoxyVerb}
 
 
-to build in support and select it at runtime.
-
-\subsection*{S\+MP / Multithreaded service }
-
+to build in support and select it at runtime.\hypertarget{md_README.coding_smp}{}\section{S\+M\+P / Multithreaded service}\label{md_README.coding_smp}
 S\+MP support is integrated into L\+WS without any internal threading. It\textquotesingle{}s very simple to use, libwebsockets-\/test-\/server-\/pthread shows how to do it, use -\/j $<$n$>$ argument there to control the number of service threads up to 32.
 
 Two new members are added to the info struct \begin{DoxyVerb}    unsigned int count_threads;
@@ -277,10 +248,7 @@ Because lws will limit the requested number of actual threads supported accordin
 
 It\textquotesingle{}s required to implement locking in the user code in the same way that libwebsockets-\/test-\/server-\/pthread does it, for the FD locking callbacks.
 
-There is no knowledge or dependency in lws itself about pthreads. How the locking is implemented is entirely up to the user code.
-
-\subsection*{Libev / Libuv support }
-
+There is no knowledge or dependency in lws itself about pthreads. How the locking is implemented is entirely up to the user code.\hypertarget{md_README.coding_libevuv}{}\section{Libev / Libuv support}\label{md_README.coding_libevuv}
 You can select either or both \begin{DoxyVerb}    -DLWS_WITH_LIBEV=1
     -DLWS_WITH_LIBUV=1
 \end{DoxyVerb}
@@ -291,10 +259,7 @@ at cmake configure-\/time. The user application may use one of the context init
 \end{DoxyVerb}
 
 
-to indicate it will use either of the event libraries.
-
-\subsection*{Extension option control from user code }
-
+to indicate it will use either of the event libraries.\hypertarget{md_README.coding_extopts}{}\section{Extension option control from user code}\label{md_README.coding_extopts}
 User code may set per-\/connection extension options now, using a new api {\ttfamily \hyperlink{group__extensions_gae0e24e1768f83a7fb07896ce975704b9}{lws\+\_\+set\+\_\+extension\+\_\+option()}}.
 
 This should be called from the E\+S\+T\+A\+B\+L\+I\+S\+H\+ED callback like this 
@@ -306,10 +271,7 @@ This should be called from the E\+S\+T\+A\+B\+L\+I\+S\+H\+ED callback like this
 
 If the extension is not active (missing or not negotiated for the connection, or extensions are disabled on the library) the call is just returns -\/1. Otherwise the connection\textquotesingle{}s extension has its named option changed.
 
-The extension may decide to alter or disallow the change, in the example above permessage-\/deflate restricts the size of his rx output buffer also considering the protocol\textquotesingle{}s rx\+\_\+buf\+\_\+size member.
-
-\subsection*{Client connections as H\+T\+TP\mbox{[}S\mbox{]} rather than WS\mbox{[}S\mbox{]} }
-
+The extension may decide to alter or disallow the change, in the example above permessage-\/deflate restricts the size of his rx output buffer also considering the protocol\textquotesingle{}s rx\+\_\+buf\+\_\+size member.\hypertarget{md_README.coding_httpsclient}{}\section{Client connections as H\+T\+T\+P\mbox{[}\+S\mbox{]} rather than W\+S\mbox{[}\+S\mbox{]}}\label{md_README.coding_httpsclient}
 You may open a generic http client connection using the same struct \hyperlink{structlws__client__connect__info}{lws\+\_\+client\+\_\+connect\+\_\+info} used to create client ws\mbox{[}s\mbox{]} connections.
 
 To stay in http\mbox{[}s\mbox{]}, set the optional info member \char`\"{}method\char`\"{} to point to the string \char`\"{}\+G\+E\+T\char`\"{} instead of the default N\+U\+LL.
@@ -346,8 +308,7 @@ Either way you use the api {\ttfamily lws\+\_\+http\+\_\+client\+\_\+read()} to
 \end{DoxyCode}
 
 
-\subsection*{Using lws v2 vhosts }
-
+Notice that if you will use S\+SL client connections on a vhost, you must prepare the client S\+SL context for the vhost after creating the vhost, since this is not normally done if the vhost was set up to listen / serve. Call the api \hyperlink{group__client_ga4f44b8230e6732816ca5cd8d1aaaf340}{lws\+\_\+init\+\_\+vhost\+\_\+client\+\_\+ssl()} to also allow client S\+SL on the vhost.\hypertarget{md_README.coding_vhosts}{}\section{Using lws vhosts}\label{md_README.coding_vhosts}
 If you set L\+W\+S\+\_\+\+S\+E\+R\+V\+E\+R\+\_\+\+O\+P\+T\+I\+O\+N\+\_\+\+E\+X\+P\+L\+I\+C\+I\+T\+\_\+\+V\+H\+O\+S\+TS options flag when you create your context, it won\textquotesingle{}t create a default vhost using the info struct members for compatibility. Instead you can call \hyperlink{group__context-and-vhost_ga0c54c667ccd9b8b3dddcd123ca72f87c}{lws\+\_\+create\+\_\+vhost()} afterwards to attach one or more vhosts manually.
 
 
@@ -374,10 +335,14 @@ If you set L\+W\+S\+\_\+\+S\+E\+R\+V\+E\+R\+\_\+\+O\+P\+T\+I\+O\+N\+\_\+\+E\+X\+
 
 When you attach the vhost, if the vhost\textquotesingle{}s port already has a listen socket then both vhosts share it and use S\+NI (is S\+SL in use) or the Host\+: header from the client to select the right one. Or if no other vhost already listening the a new listen socket is created.
 
-There are some new members but mainly it\textquotesingle{}s stuff you used to set at context creation time.
+There are some new members but mainly it\textquotesingle{}s stuff you used to set at context creation time.\hypertarget{md_README.coding_sni}{}\section{How lws matches hostname or S\+N\+I to a vhost}\label{md_README.coding_sni}
+L\+WS first strips any trailing \+:port number.
+
+Then it tries to find an exact name match for a vhost listening on the correct port, ie, if S\+NI or the Host\+: header provided abc.\+com\+:1234, it will match on a vhost named abc.\+com that is listening on port 1234.
 
-\subsection*{Using lws v2 mounts on a vhost }
+If there is no exact match, lws will consider wildcard matches, for example if cats.\+abc.\+com\+:1234 is provided by the client by S\+NI or Host\+: header, it will accept a vhost \char`\"{}abc.\+com\char`\"{} listening on port 1234. If there was a better, exact, match, it will have been chosen in preference to this.
 
+Connections with S\+SL will still have the client go on to check the certificate allows wildcards and error out if not.\hypertarget{md_README.coding_mounts}{}\section{Using lws mounts on a vhost}\label{md_README.coding_mounts}
 The last argument to \hyperlink{group__context-and-vhost_ga0c54c667ccd9b8b3dddcd123ca72f87c}{lws\+\_\+create\+\_\+vhost()} lets you associate a linked list of \hyperlink{structlws__http__mount}{lws\+\_\+http\+\_\+mount} structures with that vhost\textquotesingle{}s U\+RL \textquotesingle{}namespace\textquotesingle{}, in a similar way that unix lets you mount filesystems into areas of your / filesystem how you like and deal with the contents transparently.
 
 
@@ -429,10 +394,7 @@ Both the mount structures and the strings must persist until the context is dest
 \item L\+W\+S\+M\+P\+R\+O\+\_\+\+C\+GI associates the url namespace with the given C\+GI executable, which runs when the U\+RL is accessed and the output provided to the client.
 \item L\+W\+S\+M\+P\+R\+O\+\_\+\+R\+E\+D\+I\+R\+\_\+\+H\+T\+TP and L\+W\+S\+M\+P\+R\+O\+\_\+\+R\+E\+D\+I\+R\+\_\+\+H\+T\+T\+PS auto-\/redirect clients to the given origin U\+RL.
 \item L\+W\+S\+M\+P\+R\+O\+\_\+\+C\+A\+L\+L\+B\+A\+CK causes the http connection to attach to the callback associated with the named protocol (which may be a plugin).
-\end{DoxyItemize}
-
-\subsection*{Operation of L\+W\+S\+M\+P\+R\+O\+\_\+\+C\+A\+L\+L\+B\+A\+CK mounts }
-
+\end{DoxyItemize}\hypertarget{md_README.coding_mountcallback}{}\section{Operation of L\+W\+S\+M\+P\+R\+O\+\_\+\+C\+A\+L\+L\+B\+A\+C\+K mounts}\label{md_README.coding_mountcallback}
 The feature provided by C\+A\+L\+L\+B\+A\+CK type mounts is binding a part of the U\+RL namespace to a named protocol callback handler.
 
 This allows protocol plugins to handle areas of the U\+RL namespace. For example in test-\/server-\/v2.\+0.\+c, the U\+RL area \char`\"{}/formtest\char`\"{} is associated with the plugin providing \char`\"{}protocol-\/post-\/demo\char`\"{} like this
index 70871c7..58523aa 100644 (file)
@@ -1,11 +1,7 @@
-\subsection*{Enabling for build }
-
+\hypertarget{md_README.generic-sessions_gseb}{}\section{Enabling lwsgs for build}\label{md_README.generic-sessions_gseb}
 Enable at C\+Make with -\/\+D\+L\+W\+S\+\_\+\+W\+I\+T\+H\+\_\+\+G\+E\+N\+E\+R\+I\+C\+\_\+\+S\+E\+S\+S\+I\+O\+NS=1
 
-This also needs sqlite3 (libsqlite3-\/dev or similar package)
-
-\subsection*{Introduction }
-
+This also needs sqlite3 (libsqlite3-\/dev or similar package)\hypertarget{md_README.generic-sessions_gsi}{}\section{lwsgs Introduction}\label{md_README.generic-sessions_gsi}
 The generic-\/sessions protocol plugin provides cookie-\/based login authentication for lws web and ws connections.
 
 The plugin handles everything about generic account registration, email verification, lost password, account deletion, and other generic account management.
@@ -26,10 +22,7 @@ Other code, in another eg, ws protocol handler, only needs very high-\/level sta
 \item Eliminates server-\/side scripting with a few rewritten symbols and javascript on client side
 \item 32-\/bit bitfield for authentication sectoring, mounts can provide a mask on the loggin-\/in session\textquotesingle{}s associated server-\/side bitfield that must be set for access.
 \item No code (just config) required for, eg, private U\+RL namespace that requires login to access.
-\end{DoxyItemize}
-
-\subsection*{Integration to H\+T\+ML }
-
+\end{DoxyItemize}\hypertarget{md_README.generic-sessions_gsin}{}\section{Lwsgs Integration to H\+T\+ML}\label{md_README.generic-sessions_gsin}
 Only three steps are needed to integrate lwsgs in your H\+T\+ML.
 
 1) lwsgs H\+T\+ML UI is bundled with the javascript it uses in {\ttfamily lwsgs.\+js}, so import that script file in your head section
@@ -68,8 +61,7 @@ That\textquotesingle{}s it. An example is below
 24  </body>
 25 </html>
 \end{DoxyCode}
- \subsection*{Overall Flow }
-
+\hypertarget{md_README.generic-sessions_gsof}{}\section{Lwsgs Overall Flow@}\label{md_README.generic-sessions_gsof}
 When the protocol is initialized, it gets per-\/vhost information from the config, such as where the sqlite3 databases are to be stored. The admin username and sha-\/1 of the admin password are also taken from here.
 
 In the mounts using protocol-\/generic-\/sessions, a cookie is maintained against any requests; if no cookie was active on the initial request a new session is created with no attached user.
@@ -80,11 +72,8 @@ In the example html going to the mount /lwsgs loads a login / register page as t
 
 The $<$form$>$ in the login page contains \textquotesingle{}next url\textquotesingle{} hidden inputs that let the html \textquotesingle{}program\textquotesingle{} where the form handler will go after a successful admin login, a successful user login and a failed login.
 
-After a successful login, the sqlite record at the server for the current session is updated to have the logged-\/in username associated with it.
-
-\subsection*{Configuration }
-
-\char`\"{}auth-\/mask\char`\"{} defines the autorization sector bits that must be enabled on the session to gain access.
+After a successful login, the sqlite record at the server for the current session is updated to have the logged-\/in username associated with it.\hypertarget{md_README.generic-sessions_gsconf}{}\section{Lwsgs Configuration}\label{md_README.generic-sessions_gsconf}
+\char`\"{}auth-\/mask\char`\"{} defines the authorization sector bits that must be enabled on the session to gain access.
 
 \char`\"{}auth-\/mask\char`\"{} 0 is the default.
 
@@ -191,14 +180,8 @@ The real protocol that makes use of generic-\/sessions must also be listed and a
 \end{DoxyCode}
 
 
-Notice the real application uses his own sqlite db, no details about how generic-\/sessions works or how it stores data are available to it.
-
-\subsection*{Password Confounder }
-
-You can also define a per-\/vhost confounder shown in the example above, used when aggregating the password with the salt when it is hashed. Any attacker will also need to get the confounder along with the database, which you can make harder by making the config dir only eneterable / readable by root.
-
-\subsection*{Preparing the db directory }
-
+Notice the real application uses his own sqlite db, no details about how generic-\/sessions works or how it stores data are available to it.\hypertarget{md_README.generic-sessions_gspwc}{}\section{Lwsgs Password Confounder}\label{md_README.generic-sessions_gspwc}
+You can also define a per-\/vhost confounder shown in the example above, used when aggregating the password with the salt when it is hashed. Any attacker will also need to get the confounder along with the database, which you can make harder by making the config dir only eneterable / readable by root.\hypertarget{md_README.generic-sessions_gsprep}{}\section{Lwsgs Preparing the db directory}\label{md_README.generic-sessions_gsprep}
 You will have to prepare the db directory so it\textquotesingle{}s suitable for the lwsws user to use, that usually means apache, eg
 
 
@@ -207,20 +190,16 @@ You will have to prepare the db directory so it\textquotesingle{}s suitable for
 2 # chown root:apache /var/www/sessions
 3 # chmod 770 /var/www/sessions
 \end{DoxyCode}
-
-
-\subsection*{Email configuration }
-
+\hypertarget{md_README.generic-sessions_gsrmail}{}\section{Lwsgs Email configuration}\label{md_README.generic-sessions_gsrmail}
 lwsgs will can send emails by talking to an S\+M\+TP server on localhost\+:25. That will usually be sendmail or postfix, you should confirm that works first by itself using the {\ttfamily mail} application to send on it.
 
-lwsgs has been tested on stock Fedora sendmail and postfix.
-
-\subsection*{Integration with another protocol }
-
+lwsgs has been tested on stock Fedora sendmail and postfix.\hypertarget{md_README.generic-sessions_gsap}{}\section{Lwsgs Integration with another protocol}\label{md_README.generic-sessions_gsap}
 lwsgs is designed to provide sessions and accounts in a standalone and generic way.
 
 But it\textquotesingle{}s not useful by itself, there will always be the actual application who wants to make use of generic-\/sessions features.
 
+We provide the \char`\"{}messageboard\char`\"{} plugin as an example of how to integrate with your actual application protocol.
+
 The basic approach is the \textquotesingle{}real\textquotesingle{} protocol handler (usually a plugin itself) subclasses the generic-\/sessions plugin and calls through to it by default.
 
 The \char`\"{}real\char`\"{} protocol handler entirely deals with ws-\/related stuff itself, since generic-\/sessions does not use ws. But for
@@ -292,7 +271,7 @@ To ease management of these secondary allocations, there are callbacks that occu
 \end{DoxyCode}
 
 
-\subsection*{Getting session-\/specific information from another protocol }
+\#section gsapsib Getting session-\/specific information from another protocol
 
 At least at the time when someone tries to upgrade an http(s) connection to ws(s) with your real protocol, it is necessary to confirm the cookie the http(s) connection has with generic-\/sessions and find out his username and other info.
 
index afe0aed..2a52cf6 100644 (file)
@@ -1,18 +1,17 @@
-\subsection*{Libwebsockets Web Server }
-
+\hypertarget{md_README.lwsws_lwsws}{}\section{Libwebsockets Web Server}\label{md_README.lwsws_lwsws}
 lwsws is an implementation of a very lightweight, ws-\/capable generic web server, which uses libwebsockets to implement everything underneath.
 
-\subsection*{Build }
-
+If you are basically implementing a standalone server with lws, you can avoid reinventing the wheel and use a debugged server including lws.\hypertarget{md_README.lwsws_lwswsb}{}\section{Build}\label{md_README.lwsws_lwswsb}
 Just enable -\/\+D\+L\+W\+S\+\_\+\+W\+I\+T\+H\+\_\+\+L\+W\+S\+WS=1 at cmake-\/time.
 
-It enables libuv and plugin support automatically.
+It enables libuv and plugin support automatically.\hypertarget{md_README.lwsws_lwswsc}{}\section{Lwsws Configuration}\label{md_README.lwsws_lwswsc}
+lwsws uses J\+S\+ON config files, they\textquotesingle{}re pure J\+S\+ON except\+:
 
-\subsection*{Configuration }
 
-lwsws uses J\+S\+ON config files, they\textquotesingle{}re pure J\+S\+ON but \# may be used to turn the rest of the line into a comment.
-
-There\textquotesingle{}s also a single substitution, if a string contains \char`\"{}\+\_\+lws\+\_\+ddir\+\_\+\char`\"{}, then that is replaced with the L\+WS install data directory path, eg, \char`\"{}/usr/share\char`\"{} or whatever was set when L\+WS was built + installed. That lets you refer to installed paths without having to change the config if your install path was different.
+\begin{DoxyItemize}
+\item \textquotesingle{}\#\textquotesingle{} may be used to turn the rest of the line into a comment.
+\item There\textquotesingle{}s also a single substitution, if a string contains \char`\"{}\+\_\+lws\+\_\+ddir\+\_\+\char`\"{}, then that is replaced with the L\+WS install data directory path, eg, \char`\"{}/usr/share\char`\"{} or whatever was set when L\+WS was built + installed. That lets you refer to installed paths without having to change the config if your install path was different.
+\end{DoxyItemize}
 
 There is a single file intended for global settings
 
@@ -59,8 +58,7 @@ There is a single file intended for global settings
 3 # cp ./lwsws/etc-lwsws-conf.d-localhost-EXAMPLE /etc/lwsws/conf.d/test-server
 4 # sudo lwsws
 \end{DoxyCode}
- \subsection*{Vhosts }
-
+\hypertarget{md_README.lwsws_lwswsv}{}\section{Lwsws Vhosts}\label{md_README.lwsws_lwswsv}
 One server can run many vhosts, where S\+SL is in use S\+NI is used to match the connection to a vhost and its vhost-\/specific S\+SL keys during S\+SL negotiation.
 
 Listing multiple vhosts looks something like this 
@@ -115,20 +113,14 @@ Listing multiple vhosts looks something like this
 \end{DoxyCode}
 
 
-That sets up three vhosts all called \char`\"{}localhost\char`\"{} on ports 443 and 7681 with S\+SL, and port 80 without S\+SL but with a forced redirect to \href{https://localhost}{\tt https\+://localhost}
-
-\subsection*{Vhost name and port }
-
+That sets up three vhosts all called \char`\"{}localhost\char`\"{} on ports 443 and 7681 with S\+SL, and port 80 without S\+SL but with a forced redirect to \href{https://localhost}{\tt https\+://localhost}\hypertarget{md_README.lwsws_lwswsvn}{}\section{Lwsws Vhost name and port sharing}\label{md_README.lwsws_lwswsvn}
 The vhost name field is used to match on incoming S\+NI or Host\+: header, so it must always be the host name used to reach the vhost externally.
 
 
 \begin{DoxyItemize}
 \item Vhosts may have the same name and different ports, these will each create a listening socket on the appropriate port.
 \item Vhosts may also have the same port and different name\+: these will be treated as true vhosts on one listening socket and the active vhost decided at S\+SL negotiation time (via S\+NI) or if no S\+SL, then after the Host\+: header from the client has been parsed.
-\end{DoxyItemize}
-
-\subsection*{Protocols }
-
+\end{DoxyItemize}\hypertarget{md_README.lwsws_lwswspr}{}\section{Lwsws Protocols}\label{md_README.lwsws_lwswspr}
 Vhosts by default have available the union of any initial protocols from context creation time, and any protocols exposed by plugins.
 
 Vhosts can select which plugins they want to offer and give them per-\/vhost settings using this syntax 
@@ -152,10 +144,7 @@ To indicate that a protocol should be used when no Protocol\+: header is sent by
 5   \}
 6 \}]
 \end{DoxyCode}
-
-
-\subsection*{Other vhost options }
-
+\hypertarget{md_README.lwsws_lwswsovo}{}\section{Lwsws Other vhost options}\label{md_README.lwsws_lwswsovo}
 
 \begin{DoxyItemize}
 \item If the three options {\ttfamily host-\/ssl-\/cert}, {\ttfamily host-\/ssl-\/ca} and {\ttfamily host-\/ssl-\/key} are given, then the vhost supports S\+SL.
@@ -199,10 +188,7 @@ would equate to
 
 \begin{DoxyItemize}
 \item \char`\"{}`ssl-\/option-\/clear\textquotesingle{}\char`\"{}\+: \char`\"{}$<$decimal$>$\char`\"{} Clears the S\+SL option flag value for the vhost. It may be used multiple times and OR\textquotesingle{}s the flags together.
-\end{DoxyItemize}
-
-\subsection*{Mounts }
-
+\end{DoxyItemize}\hypertarget{md_README.lwsws_lwswsm}{}\section{Lwsws Mounts}\label{md_README.lwsws_lwswsm}
 Where mounts are given in the vhost definition, then directory contents may be auto-\/served if it matches the mountpoint.
 
 Mount protocols are used to control what kind of translation happens
@@ -238,10 +224,7 @@ Eg, with this mountpoint
 9 \},
 \end{DoxyCode}
  would cause the url /git/myrepo to pass \char`\"{}myrepo\char`\"{} to the cgi /var/www/cgi-\/bin/cgit and send the results to the client.
-\end{DoxyItemize}
-
-\subsection*{Other mount options }
-
+\end{DoxyItemize}\hypertarget{md_README.lwsws_lwswsomo}{}\section{Lwsws Other mount options}\label{md_README.lwsws_lwswsomo}
 1) Some protocols may want \char`\"{}per-\/mount options\char`\"{} in name\+:value format. You can provide them using \char`\"{}pmo\char`\"{} \begin{DoxyVerb}           {
             "mountpoint": "/stuff",
             "origin": "callback://myprotocol",
@@ -302,10 +285,7 @@ See the related notes in R\+E\+A\+D\+M\+E.\+coding.\+md
 3          ".doc": "text/evil"
 4  \}
 \end{DoxyCode}
-
-
-\subsection*{Plugins }
-
+\hypertarget{md_README.lwsws_lwswspl}{}\section{Lwsws Plugins}\label{md_README.lwsws_lwswspl}
 Protcols and extensions may also be provided from \char`\"{}plugins\char`\"{}, these are lightweight dynamic libraries. They are scanned for at init time, and any protocols and extensions found are added to the list given at context creation time.
 
 Protocols receive init (L\+W\+S\+\_\+\+C\+A\+L\+L\+B\+A\+C\+K\+\_\+\+P\+R\+O\+T\+O\+C\+O\+L\+\_\+\+I\+N\+IT) and destruction (L\+W\+S\+\_\+\+C\+A\+L\+L\+B\+A\+C\+K\+\_\+\+P\+R\+O\+T\+O\+C\+O\+L\+\_\+\+D\+E\+S\+T\+R\+OY) callbacks per-\/vhost, and there are arrangements they can make per-\/vhost allocations and get hold of the correct pointer from the wsi at the callback.
@@ -323,10 +303,7 @@ To help that happen conveniently, there are some new apis
 \item lws\+\_\+protocol\+\_\+vh\+\_\+priv\+\_\+get(vhost, protocol)
 \end{DoxyItemize}
 
-dumb increment, mirror and status protocol plugins are provided as examples.
-
-\subsection*{Additional plugin search paths }
-
+dumb increment, mirror and status protocol plugins are provided as examples.\hypertarget{md_README.lwsws_lwswsplaplp}{}\section{Additional plugin search paths}\label{md_README.lwsws_lwswsplaplp}
 Packages that have their own lws plugins can install them in their own preferred dir and ask lwsws to scan there by using a config fragment like this, in its own conf.\+d/ file managed by the other package 
 \begin{DoxyCode}
 1 \{
@@ -335,10 +312,7 @@ Packages that have their own lws plugins can install them in their own preferred
 4   \}
 5 \}
 \end{DoxyCode}
-
-
-\subsection*{lws-\/server-\/status plugin }
-
+\hypertarget{md_README.lwsws_lwswsssp}{}\section{lws-\/server-\/status plugin}\label{md_README.lwsws_lwswsssp}
 One provided protocol can be used to monitor the server status.
 
 Enable the protocol like this on a vhost\textquotesingle{}s ws-\/protocols section 
@@ -358,10 +332,7 @@ And map the provided H\+T\+ML into the vhost in the mounts section
 4  "default": "server-status.html"
 5 \}
 \end{DoxyCode}
- You might choose to put it on its own vhost which has \char`\"{}interface\char`\"{}\+: \char`\"{}lo\char`\"{}, so it\textquotesingle{}s not externally visible.
-
-\subsection*{Integration with Systemd }
-
+ You might choose to put it on its own vhost which has \char`\"{}interface\char`\"{}\+: \char`\"{}lo\char`\"{}, so it\textquotesingle{}s not externally visible.\hypertarget{md_README.lwsws_lwswssysd}{}\section{Lwsws Integration with Systemd}\label{md_README.lwsws_lwswssysd}
 lwsws needs a service file like this as {\ttfamily /usr/lib/systemd/system/lwsws.service} 
 \begin{DoxyCode}
 1 [Unit]
@@ -377,10 +348,7 @@ lwsws needs a service file like this as {\ttfamily /usr/lib/systemd/system/lwsws
 \end{DoxyCode}
 
 
-You can find this prepared in {\ttfamily ./lwsws/usr-\/lib-\/systemd-\/system-\/lwsws.service}
-
-\subsection*{Integration with logrotate }
-
+You can find this prepared in {\ttfamily ./lwsws/usr-\/lib-\/systemd-\/system-\/lwsws.service}\hypertarget{md_README.lwsws_lwswslr}{}\section{Lwsws Integration with logrotate}\label{md_README.lwsws_lwswslr}
 For correct operation with logrotate, {\ttfamily /etc/logrotate.d/lwsws} (if that\textquotesingle{}s where we\textquotesingle{}re putting the logs) should contain 
 \begin{DoxyCode}
 1 /var/log/lwsws/*log \{
index 76c7844..2a5a729 100644 (file)
@@ -30,20 +30,14 @@ This is the original way lws implemented servers, plugins and libuv are not requ
 
 This method is still supported in lws but all ongoing and future work is being done in protocol plugins only.
 
-\section*{Notes about lws test apps }
-
-\subsection*{Testing server with a browser }
-
+\section*{Notes about lws test apps }\hypertarget{md_README.test-apps_tsb}{}\section{Testing server with a browser}\label{md_README.test-apps_tsb}
 If you run \href{test-server/test-server.c}{\tt libwebsockets-\/test-\/server} and point your browser (eg, Chrome) to \begin{DoxyVerb}    http://127.0.0.1:7681
 \end{DoxyVerb}
 
 
 It will fetch a script in the form of {\ttfamily test.\+html}, and then run the script in there on the browser to open a websocket connection. Incrementing numbers should appear in the browser display.
 
-By default the test server logs to both stderr and syslog, you can control what is logged using {\ttfamily -\/d $<$log level$>$}, see later.
-
-\subsection*{Running test server as a Daemon }
-
+By default the test server logs to both stderr and syslog, you can control what is logged using {\ttfamily -\/d $<$log level$>$}, see later.\hypertarget{md_README.test-apps_tsd}{}\section{Running test server as a Daemon}\label{md_README.test-apps_tsd}
 You can use the -\/D option on the test server to have it fork into the background and return immediately. In this daemonized mode all stderr is disabled and logging goes only to syslog, eg, {\ttfamily /var/log/messages} or similar.
 
 The server maintains a lockfile at {\ttfamily /tmp/.lwsts-\/lock} that contains the pid of the master process, and deletes this file when the master process terminates.
@@ -54,10 +48,7 @@ To stop the daemon, do
 \end{DoxyCode}
  If it finds a stale lock (the pid mentioned in the file does not exist any more) it will delete the lock and create a new one during startup.
 
-If the lock is valid, the daemon will exit with a note on stderr that it was already running.
-
-\subsection*{Using S\+SL on the server side }
-
+If the lock is valid, the daemon will exit with a note on stderr that it was already running.\hypertarget{md_README.test-apps_sssl}{}\section{Using S\+S\+L on the server side}\label{md_README.test-apps_sssl}
 To test it using S\+S\+L/\+W\+SS, just run the test server with 
 \begin{DoxyCode}
 1 $ libwebsockets-test-server --ssl
@@ -68,10 +59,7 @@ To test it using S\+S\+L/\+W\+SS, just run the test server with
 \end{DoxyCode}
  The connection will be entirely encrypted using some generated certificates that your browser will not accept, since they are not signed by any real Certificate Authority. Just accept the certificates in the browser and the connection will proceed in first https and then websocket wss, acting exactly the same.
 
-\href{test-server/test-server.c}{\tt test-\/server.\+c} is all that is needed to use libwebsockets for serving both the script html over http and websockets.
-
-\subsection*{Testing websocket client support }
-
+\href{test-server/test-server.c}{\tt test-\/server.\+c} is all that is needed to use libwebsockets for serving both the script html over http and websockets.\hypertarget{md_README.test-apps_wscl}{}\section{Testing websocket client support}\label{md_README.test-apps_wscl}
 If you run the test server as described above, you can also connect to it using the test client as well as a browser.
 
 
@@ -90,18 +78,12 @@ The test client supports S\+SL too, use
 \end{DoxyCode}
 
 
-the -\/s tells it to accept the default selfsigned cert from the server, otherwise it will strictly fail the connection if there is no CA cert to validate the server\textquotesingle{}s certificate.
-
-\subsection*{Choosing between test server variations }
-
+the -\/s tells it to accept the default selfsigned cert from the server, otherwise it will strictly fail the connection if there is no CA cert to validate the server\textquotesingle{}s certificate.\hypertarget{md_README.test-apps_choosingts}{}\section{Choosing between test server variations}\label{md_README.test-apps_choosingts}
 If you will be doing standalone serving with lws, ideally you should avoid making your own server at all, and use lwsws with your own protocol plugins.
 
 The second best option is follow test-\/server-\/v2.\+0.\+c, which uses a mount to autoserve a directory, and lws protocol plugins for ws, without needing any user callback code (other than what\textquotesingle{}s needed in the protocol plugin).
 
-For those two options libuv is needed to support the protocol plugins, if that\textquotesingle{}s not possible then the other variations with their own protocol code should be considered.
-
-\subsection*{Testing simple echo }
-
+For those two options libuv is needed to support the protocol plugins, if that\textquotesingle{}s not possible then the other variations with their own protocol code should be considered.\hypertarget{md_README.test-apps_echo}{}\section{Testing simple echo}\label{md_README.test-apps_echo}
 You can test against {\ttfamily echo.\+websockets.\+org} as a sanity test like this (the client connects to port {\ttfamily 80} by default)\+:
 
 
@@ -118,18 +100,12 @@ This echo test is of limited use though because it doesn\textquotesingle{}t nego
 \begin{DoxyCode}
 1 $ libwebsockets-test-echo --client localhost --port 7681
 \end{DoxyCode}
- If you add the {\ttfamily -\/-\/ssl} switch to both the client and server, you can also test with an encrypted link.
-
-\subsection*{Testing S\+SL on the client side }
-
+ If you add the {\ttfamily -\/-\/ssl} switch to both the client and server, you can also test with an encrypted link.\hypertarget{md_README.test-apps_tassl}{}\section{Testing S\+S\+L on the client side}\label{md_README.test-apps_tassl}
 To test S\+S\+L/\+W\+SS client action, just run the client test with 
 \begin{DoxyCode}
 1 $ libwebsockets-test-client localhost --ssl
 \end{DoxyCode}
- By default the client test applet is set to accept selfsigned certificates used by the test server, this is indicated by the {\ttfamily use\+\_\+ssl} var being set to {\ttfamily 2}. Set it to {\ttfamily 1} to reject any server certificate that it doesn\textquotesingle{}t have a trusted CA cert for.
-
-\subsection*{Using the websocket ping utility }
-
+ By default the client test applet is set to accept selfsigned certificates used by the test server, this is indicated by the {\ttfamily use\+\_\+ssl} var being set to {\ttfamily 2}. Set it to {\ttfamily 1} to reject any server certificate that it doesn\textquotesingle{}t have a trusted CA cert for.\hypertarget{md_README.test-apps_taping}{}\section{Using the websocket ping utility}\label{md_README.test-apps_taping}
 libwebsockets-\/test-\/ping connects as a client to a remote websocket server and pings it like the normal unix ping utility. 
 \begin{DoxyCode}
 1 $ libwebsockets-test-ping localhost
@@ -155,10 +131,7 @@ Using the lws-\/mirror protocol that is provided by the test server, libwebsocke
 
 The default interval between pings is 1s, you can use the -\/i= flag to set this, including fractions like {\ttfamily -\/i=0.\+01} for 10ms interval.
 
-Before you can even use the P\+I\+NG opcode that is part of the standard, you must complete a handshake with a specified protocol. By default lws-\/mirror-\/protocol is used which is supported by the test server. But if you are using it on another server, you can specify the protcol to handshake with by {\ttfamily -\/-\/protocol=protocolname}
-
-\subsection*{Fraggle test app }
-
+Before you can even use the P\+I\+NG opcode that is part of the standard, you must complete a handshake with a specified protocol. By default lws-\/mirror-\/protocol is used which is supported by the test server. But if you are using it on another server, you can specify the protcol to handshake with by {\ttfamily -\/-\/protocol=protocolname}\hypertarget{md_README.test-apps_ta}{}\section{fraggle Fraggle test app}\label{md_README.test-apps_ta}
 By default it runs in server mode 
 \begin{DoxyCode}
 1 $ libwebsockets-test-fraggle
@@ -192,10 +165,7 @@ By default it runs in server mode
 \end{DoxyCode}
  The fraggle test sends a random number up to 1024 fragmented websocket frames each of a random size between 1 and 2001 bytes in a single message, then sends a checksum and starts sending a new randomly sized and fragmented message.
 
-The fraggle test client receives the same message fragments and computes the same checksum using websocket framing to see when the message has ended. It then accepts the server checksum message and compares that to its checksum.
-
-\subsection*{proxy support }
-
+The fraggle test client receives the same message fragments and computes the same checksum using websocket framing to see when the message has ended. It then accepts the server checksum message and compares that to its checksum.\hypertarget{md_README.test-apps_taproxy}{}\section{proxy support}\label{md_README.test-apps_taproxy}
 The http\+\_\+proxy environment variable is respected by the client connection code for both {\ttfamily ws\+://} and {\ttfamily wss\+://}. It doesn\textquotesingle{}t support authentication.
 
 You use it like this 
@@ -203,15 +173,18 @@ You use it like this
 1 $ export http\_proxy=myproxy.com:3128
 2 $ libwebsockets-test-client someserver.com
 \end{DoxyCode}
+\hypertarget{md_README.test-apps_talog}{}\section{debug logging}\label{md_README.test-apps_talog}
+By default logging of severity \char`\"{}notice\char`\"{}, \char`\"{}warn\char`\"{} or \char`\"{}err\char`\"{} is enabled to stderr.
 
+Again by default other logging is compiled in but disabled from printing.
 
-\subsection*{debug logging }
+By default debug logs below \char`\"{}notice\char`\"{} in severity are not compiled in. To get them included, add this option in C\+M\+A\+KE
 
-By default logging of severity \char`\"{}notice\char`\"{}, \char`\"{}warn\char`\"{} or \char`\"{}err\char`\"{} is enabled to stderr.
 
-Again by default other logging is compiled in but disabled from printing.
+\begin{DoxyCode}
+1 $ cmake .. -DCMAKE\_BUILD\_TYPE=DEBUG
+\end{DoxyCode}
 
-If you want to eliminate the debug logging below notice in severity, use the {\ttfamily -\/-\/disable-\/debug} configure option to have it removed from the code by the preprocesser.
 
 If you want to see more detailed debug logs, you can control a bitfield to select which logs types may print using the {\ttfamily \hyperlink{group__log_ga244647f9e1bf0097ccdde66d74f41e26}{lws\+\_\+set\+\_\+log\+\_\+level()}} api, in the test apps you can use {\ttfamily -\/d $<$number$>$} to control this. The types of logging available are (OR together the numbers to select multiple)
 
@@ -227,22 +200,13 @@ If you want to see more detailed debug logs, you can control a bitfield to selec
 \item 128 E\+X\+T\+E\+N\+S\+I\+ON
 \item 256 C\+L\+I\+E\+NT
 \item 512 L\+A\+T\+E\+N\+CY
-\end{DoxyItemize}
-
-\subsection*{Websocket version supported }
-
-The final I\+E\+TF standard is supported for both client and server, protocol version 13.
-
-\subsection*{Latency Tracking }
-
+\end{DoxyItemize}\hypertarget{md_README.test-apps_ws13}{}\section{Websocket version supported}\label{md_README.test-apps_ws13}
+The final I\+E\+TF standard is supported for both client and server, protocol version 13.\hypertarget{md_README.test-apps_latency}{}\section{Latency Tracking}\label{md_README.test-apps_latency}
 Since libwebsockets runs using {\ttfamily poll()} and a single threaded approach, any unexpected latency coming from system calls would be bad news. There\textquotesingle{}s now a latency tracking scheme that can be built in with {\ttfamily -\/-\/with-\/latency} at configure-\/time, logging the time taken for system calls to complete and if the whole action did complete that time or was deferred.
 
 You can see the detailed data by enabling logging level 512 (eg, {\ttfamily -\/d 519} on the test server to see that and the usual logs), however even without that the \char`\"{}worst\char`\"{} latency is kept and reported to the logs with N\+O\+T\+I\+CE severity when the context is destroyed.
 
-Some care is needed interpreting them, if the action completed the first figure (in us) is the time taken for the whole action, which may have retried through the poll loop many times and will depend on network roundtrip times. High figures here don\textquotesingle{}t indicate a problem. The figure in us reported after \char`\"{}lat\char`\"{} in the logging is the time taken by this particular attempt. High figures here may indicate a problem, or if you system is loaded with another app at that time, such as the browser, it may simply indicate the OS gave preferential treatment to the other app during that call.
-
-\subsection*{Autobahn Test Suite }
-
+Some care is needed interpreting them, if the action completed the first figure (in us) is the time taken for the whole action, which may have retried through the poll loop many times and will depend on network roundtrip times. High figures here don\textquotesingle{}t indicate a problem. The figure in us reported after \char`\"{}lat\char`\"{} in the logging is the time taken by this particular attempt. High figures here may indicate a problem, or if you system is loaded with another app at that time, such as the browser, it may simply indicate the OS gave preferential treatment to the other app during that call.\hypertarget{md_README.test-apps_autobahn}{}\section{Autobahn Test Suite}\label{md_README.test-apps_autobahn}
 Lws can be tested against the autobahn websocket fuzzer.
 
 1) pip install autobahntestsuite
@@ -265,13 +229,10 @@ fill in \char`\"{}libwebsockets\char`\"{} in \char`\"{}\+User Agent Identifier\c
 
 \href{file:///projects/libwebsockets/reports/clients/index.html}{\tt file\+:///projects/libwebsockets/reports/clients/index.\+html}
 
-to see the results
-
-\subsection*{Autobahn Test Notes }
-
+to see the results\hypertarget{md_README.test-apps_autobahnnotes}{}\section{Autobahn Test Notes}\label{md_README.test-apps_autobahnnotes}
 1) Autobahn tests the user code + lws implementation. So to get the same results, you need to follow test-\/echo.\+c in terms of user implmentation.
 
-2) Some of the tests make no sense for Libwebsockets to support and we fail them.
+2) Two of the tests make no sense for Libwebsockets to support and we fail them.
 
 
 \begin{DoxyItemize}