Naughter Software Logo

HTTPServerWrappers and CPPCThreadPool v1.12 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.
CSecHandle This class provides a simple RAII wrapper for an SDK SecHandle.
CCredHandle This class provides a simple RAII wrapper for an SDK CredHandle.

 

Features

 

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.

 

Copyright

 

Usage

 

Updates

v1.12 (18 May 2023)

v1.11 (21 March 2023)

v1.10 (13 February 2022)

v1.09 (23 January 2022)

v1.08 (29 June 2021)

v1.07 (16 April 2021)

v1.06 (15 April 2021)

v1.05 (22 January 2021)

v1.04 (27 December 2020)

v1.03 (23 December 2020)

v1.02 (22 December 2020)

v1.01 (21 December 2020)

v1.0 (8 November 2020)