|
3 jaren geleden | |
---|---|---|
.. | ||
embedded_c | 3 jaren geleden | |
embedded_cpp | 4 jaren geleden | |
https | 4 jaren geleden | |
multidomain | 7 jaren geleden | |
rest | 6 jaren geleden | |
ws_client | 6 jaren geleden | |
README.md | 3 jaren geleden |
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.
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).