bel2125 990f86e063 Update documentation 3 vuotta sitten
..
embedded_c 9660ca555d Unit test: Error message if "localhost" cannot be resolved 3 vuotta sitten
embedded_cpp 4cca3fb108 Allow WITH_ZLIB in example Makefile 4 vuotta sitten
https 8ef4d891c5 Update links in documentation 4 vuotta sitten
multidomain 4378fdc73b Support multiple domains (Step 10/?) 7 vuotta sitten
rest f166b4f143 Revert format and update .clang-format file 6 vuotta sitten
ws_client 19b5f8a6a0 + Fixed typos 6 vuotta sitten
README.md 990f86e063 Update documentation 3 vuotta sitten

README.md

Examples

The (embedded_c) example shows how to embed civetweb into a C or C++ application.

The (embedded_cpp) example demonstrates embedding in a C++ application. It uses the C++ wrapper of the full C interface civetweb.h. The C++ wrapper only offers a limited subset of the full C API. Thus, the C example is more complete than the C++ example.

These examples were not designed with security in mind, but to show how the API can be used in principle. For more information, see the documentation. Some examples can also be found in the test folder, but they are less documented and adapted to some special needs of the test frameworks.

The (https) example shows how to configure a HTTPS server with improved security settings. It does not hold any source, but only a configuration file and some documentation how to use it.

The multidomain example demonstrates how to host multiple domains with different HTTPS certificates. It uses the standalone server (civetweb.c + main.c) and existing certificates.

The ws_client example shows how to use the websocket client interface to communicate with an (external) websocket server. It uses the "echo demo" of websocket.org and will work only if this server is reachable.

All examples are subject to the MIT license (unless noted otherwise) - they come without warranty of any kind.

Note that the examples are only meant as a demonstration how to use CivetWeb. The example codes are omitting some error checking and input validation for better readability of the source. They are not as actively maintained and continuously developed as main source of the project (include/civetweb.h, src/civetweb.c, src/*.inl).
Example codes undergo less quality management than the main source files of this project. Examples are not checked and updated with every new version. There are no repeated security assessment for the example codes, settings are not updated on a regular basis.

Contributions to examples code are welcome, under the same conditions as contributions to the main source code (Contribution.md).