2016-06-20 17:05:31 +08:00
|
|
|
##Libwebsockets API introduction
|
|
|
|
|
|
|
|
Libwebsockets covers a lot of interesting features for people making embedded servers or clients
|
|
|
|
|
2017-10-13 10:33:02 +08:00
|
|
|
- HTTP(S) serving and client operation
|
2018-08-23 09:46:01 +08:00
|
|
|
- HTTP/2 support for serving and client operation
|
2017-10-13 10:33:02 +08:00
|
|
|
- WS(S) serving and client operation
|
|
|
|
- HTTP(S) apis for file transfer and upload
|
|
|
|
- HTTP 1 + 2 POST form handling (including multipart / file upload)
|
2016-06-20 17:05:31 +08:00
|
|
|
- cookie-based sessions
|
|
|
|
- account management (including registration, email verification, lost pw etc)
|
2017-10-13 10:33:02 +08:00
|
|
|
- strong SSL / TLS PFS support (A+ on SSLlabs test)
|
|
|
|
- ssh server integration
|
|
|
|
- serving gzipped files directly from inside zip files, without conversion
|
|
|
|
- support for linux, bsd, windows etc... and very small nonlinux targets like ESP32
|
2016-06-20 17:05:31 +08:00
|
|
|
|
2018-08-23 09:46:01 +08:00
|
|
|
Please note you just need in include libwebsockets.h. It includes all the individual
|
|
|
|
includes in /usr/include/libwebsockets/ itself.
|
|
|
|
|
2021-04-06 08:22:57 +01:00
|
|
|
Browse by <a href="modules.html">API category (module)</a>
|
|
|
|
|
|
|
|
Browse by <a href="files.html">file listing</a>
|
|
|
|
|
|
|
|
Browse by <a href="annotated.html">data structures</a>
|
context deprecation
1) This makes lwsws run a parent process with the original permissions.
But this process is only able to respond to SIGHUP, it doesn't do anything
else.
2) You can send this parent process a SIGHUP now to cause it to
- close listening sockets in existing lwsws processes
- mark those processes as to exit when the number of active connections
on the falls to zero
- spawn a fresh child process from scratch, using latest configuration
file content, latest plugins, etc. It can now reopen listening sockets
if it chooses to, or open different listen ports or whatever.
Notes:
1) lws_context_destroy() has been split into two pieces... the reason for
the split is the first part closes the per-vhost protocols, but since
they may have created libuv objects in the per-vhost protocol storage,
these cannot be freed until after the loop has been run.
That's the purpose of the second part of the context destruction,
lws_context_destroy2().
For compatibility, if you are not using libuv, the first part calls the
second part. However if you are using libuv, you must now call the
second part from your own main.c after the first part.
2016-12-16 07:37:43 +08:00
|
|
|
|
|
|
|
A collection of READMEs for build, coding, lwsws etc are <a href="pages.html">here</a>
|
|
|
|
|