C++ Web Framework  3.0
Public Member Functions | Protected Member Functions | List of all members
CppWebServer Class Reference

The CppWebServer class is a HTTP server, responsable to receive and dispatch the requisitions. More...

#include <cppwebserver.h>

Inheritance diagram for CppWebServer:
Inheritance graph
[legend]

Public Member Functions

 CppWebServer (const Configuration &configuration, Filter *filter=nullptr)
 Load SSL configuration, configure the thread pool and the filter. More...
 
virtual ~CppWebServer ()
 Destroys all controllers and sessions.
 
template<typename CONTROLLER >
void addController (const QString &url) noexcept
 Hitches a url to a Controller. More...
 

Protected Member Functions

void incomingConnection (qintptr socketfd) override
 incomingConnection More...
 
void doClean ()
 Clean expired sessions on Server.
 

Detailed Description

The CppWebServer class is a HTTP server, responsable to receive and dispatch the requisitions.

Constructor & Destructor Documentation

◆ CppWebServer()

CWF_BEGIN_NAMESPACE CppWebServer::CppWebServer ( const Configuration configuration,
Filter filter = nullptr 
)
explicit

Load SSL configuration, configure the thread pool and the filter.

Parameters
Filter*filter : Install a filter for requests on the server. Optional.

Member Function Documentation

◆ addController()

template<typename CONTROLLER >
void CppWebServer::addController ( const QString &  url)
inlinenoexcept

Hitches a url to a Controller.

Parameters
constQString &url : Url name. it will not be possible to map the controllers through the addController function, instead everything should be handled inside the Filter.

◆ incomingConnection()

void CppWebServer::incomingConnection ( qintptr  socketfd)
overrideprotected

incomingConnection

Parameters
qintptrsocketfd : Socket descriptor.

The documentation for this class was generated from the following files: