NuriaProject Framework
0.1
The NuriaProject Framework
|
Base class for HttpServer back-ends. More...
#include <httpbackend.hpp>
Public Member Functions | |
HttpBackend (HttpServer *server) | |
~HttpBackend () | |
HttpServer * | httpServer () const |
virtual bool | isListening () const =0 |
virtual bool | isSecure () const |
virtual int | port () const =0 |
Protected Member Functions | |
virtual void | serverThreadCreated (QThread *thread) |
Friends | |
class | HttpServer |
Base class for HttpServer back-ends.
A HttpBackend is the bridge between a (probably low-level) connection medium, like a TCP listen socket, and the HttpServer this back-end is registered to.
For usage see HttpServer::addBackend() and HttpTransport::addToServer().
Nuria::HttpBackend::HttpBackend | ( | HttpServer * | server | ) |
Constructor.
Nuria::HttpBackend::~HttpBackend | ( | ) |
Destructor.
HttpServer* Nuria::HttpBackend::httpServer | ( | ) | const |
Returns the HTTP server this back-end is connected to.
|
pure virtual |
Returns true
if the server is currently listening for connections.
Implemented in Nuria::FastCgiBackend.
|
virtual |
Returns true
if this back-end uses secure connections. The default implementation returns false
.
Reimplemented in Nuria::FastCgiBackend.
|
pure virtual |
Returns the port this server is listening on, or -1
if it's not listening.
Implemented in Nuria::FastCgiBackend.
|
protectedvirtual |
Called by the HttpServer when a new server thread has been created. This lets back-ends register their own thread-specific bookkeeping routines.
This function will also be called by the HttpServer if no multi-threading is used. In this case, the function will be called once with thread being the one the server is associated with.
To run some kind of initialization after the thread has been started, use one of:
The default implementation does nothing.
Reimplemented in Nuria::FastCgiBackend.