bel2125 8ef4d891c5 Update links in documentation 4 năm trước cách đây
..
_obsolete 0911ddd6f3 Fixed a lot of misspellings in source code and documentation 7 năm trước cách đây
embedded_c dc9afd1865 Comment meaning of 'state' variable (#896) 4 năm trước cách đây
embedded_cpp 4cca3fb108 Allow WITH_ZLIB in example Makefile 4 năm trước cách đây
https 8ef4d891c5 Update links in documentation 4 năm trước cách đây
multidomain 4378fdc73b Support multiple domains (Step 10/?) 7 năm trước cách đây
rest f166b4f143 Revert format and update .clang-format file 6 năm trước cách đây
ws_client 19b5f8a6a0 + Fixed typos 6 năm trước cách đây
README.md 5b25223222 Add example websocket client 7 năm trước cách đây

README.md

Examples

Two examples show how to embed civetweb into a C (embedded_c) or a C++ (embedded_cpp) application. The C++ wrapper only offers a 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 the needs of the test framework).

In addition, there is one example how to configure a HTTPS server, to comply with modern security standards (https). 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 only works if this server is reachable.

Some no longer maintained examples can be found in the "obsolete" folder. It is not guaranteed that they work in the current version - they are kept for reference, but might be removed in the future.

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