Naughter Software Logo

HTTPServerWrappers and CPPCThreadPool v1.0 A set of C++ classes to encapsulate the HTTP server APIs on Windows and a pure C++ 17 Thread Pool implementation.

One of the class frameworks I developed and published on my web site many years ago was W3MFC and CThreadPoolServer. These helped me learn how HTTP and HTTPS worked as well as learn multi-threaded coding on Windows. A lot has changed in the years since this code was initially developed and I wanted to develop a new framework which encapsulates the HTTP Server API's available on Windows. These APIs let you embed an enterprise ready web server in your C++ Windows application. HTTPServerWrappers is a set of classes to encapsulate this functionality. To provide good performance you also need to tie this code to some sort of thread pool architecture. The CPPCThreadPool classes provide this thread pool functionality.


The classes provided are:

HTTPServer::CAutoInit This class provides a RAII wrapper for the SDK functions HttpInitialize and HttpTerminate.
HTTPServer::CSession This class provides a RAII wrapper for the SDK HTTP_SERVER_SESSION_ID typedef.
HTTPServer::CURLGroup This class provides a RAII wrapper for the SDK HTTP_URL_GROUP_ID typedef.
HTTPServer::CRequestQueue This class provides a RAII wrapper for the SDK request queue handle.
HTTPServer::CServer This class provides a actual class you can use in your client code to implement the HTTP server in your application.
CppConcurrency::CFunctionWrapper This class is used by the CThreadPool framework to implement its internal queue using std::packaged_task<>.
CppConcurrency::CThreadPool This class provides a thread pool framework written using just pure C++ 17 code.




The enclosed zip file contains the HTTPServerWrappers and CPPThreadPool source code and a VC 2019 console based application with demo implementation of a HTTP server.







v1.0 (8 November 2020)