|
The idea is to treat the web browser as a programmable display device and use it as an alternative to traditional C++ GUI toolkit.
The "display" is programmed using standard web-development methods (like HTML+CSS+JavaScript), which also promotes the separation between presentation and application logic:
The Embedded HTTP Server is a small and simple to use library with the following 6-step tutorial:
See the C++ API reference.
The Embedded HTTP Server library was implemented under assumption of reasonably small number of clients. Internally, a separate thread is created for each client connection. This allows to keep the implementation straightforward, and provides some useful guarantees for the program code, too - but at the price of limited scalability. This approach is obvious in the basic scenario of a program and a single browser running on the same computer. The use of several browser windows is within the scope, too, and a single program serving users in a small local network is still a reasonable use case. But this library was not meant to support heavily loaded websites on a public network. Use full-featured web-server solutions for that.
Some antivirus applications, in particular configurations, are known to intercept SSE streams, treating them as downloads that deserve scanning and thus introducing delays in their delivery. Such set-ups can interfere with the natural responsiveness of SSE techniques.
The whole library contains just two header and two source files. Just add them to your project and don't bother making a separate library for it.
The package contains example programs from the tutorial above, with minimal Makefiles for Linux, Mac OS X and Windows (Visual Studio).
The Embedded HTML Server is available with the Boost Software License.
Package: |
Purpose: |
Source package with reference docs and tutorial examples. |