SDRAngel  4.11.5
Developer docs for <a href="https://github.com/f4exb/sdrangel">SDRangel<\a>, an Open Source Qt5 / OpenGL 3.0+ SDR and signal analyzer frontend to various hardware.
httpconnectionhandlerpool.h
Go to the documentation of this file.
1 #ifndef HTTPCONNECTIONHANDLERPOOL_H
2 #define HTTPCONNECTIONHANDLERPOOL_H
3 
4 #include <QList>
5 #include <QTimer>
6 #include <QObject>
7 #include <QMutex>
8 #include "httpglobal.h"
10 #include "httplistenersettings.h"
11 
12 #include "export.h"
13 
14 namespace qtwebapp {
15 
51 class HTTPSERVER_API HttpConnectionHandlerPool : public QObject {
52  Q_OBJECT
53  Q_DISABLE_COPY(HttpConnectionHandlerPool)
54 public:
55 
62  HttpConnectionHandlerPool(QSettings* settings, HttpRequestHandler* requestHandler);
63 
70  HttpConnectionHandlerPool(const HttpListenerSettings* settings, HttpRequestHandler* requestHandler);
71 
73  virtual ~HttpConnectionHandlerPool();
74 
76  HttpConnectionHandler* getConnectionHandler();
77 
82  const HttpListenerSettings* getListenerSettings() const { return listenerSettings; }
83 
84 private:
85 
87  QSettings* settings;
88 
91 
94 
96  QList<HttpConnectionHandler*> pool;
97 
99  QTimer cleanupTimer;
100 
102  QMutex mutex;
103 
105  QSslConfiguration* sslConfiguration;
106 
108  void loadSslConfig();
109 
112 
113 private slots:
114 
116  void cleanup();
117 
118 };
119 
120 } // end of namespace
121 
122 #endif // HTTPCONNECTIONHANDLERPOOL_H
#define HTTPSERVER_API
Definition: export.h:88
const HttpListenerSettings * getListenerSettings() const
QList< HttpConnectionHandler * > pool
const HttpListenerSettings * listenerSettings