30 const QVariantMap &
opts,
32 virtual ~ServerEngine()
override;
34 virtual int workerId()
const override;
36 void setServers(
const std::vector<QObject *> &servers);
42 virtual bool init()
override;
46 if (m_lastDateTimer.hasExpired(1000)) {
47 m_lastDate = dateHeader();
48 m_lastDateTimer.restart();
53 void handleSocketShutdown(Socket *sock);
61 inline void startSocketTimeout()
63 if (m_socketTimeout && ++m_serversTimeout == 1) {
64 m_socketTimeout->start();
68 inline void stopSocketTimeout()
70 if (m_socketTimeout && --m_serversTimeout == 0) {
71 m_socketTimeout->stop();
75 inline void serverShutdown()
77 if (--m_runningServers == 0) {
78 Q_EMIT shutdownCompleted(
this);
85 friend class ProtocolHttp;
86 friend class ProtocolFastCGI;
87 friend class LocalServer;
88 friend class TcpServer;
89 friend class TcpSslServer;
90 friend class Connection;
99 QTimer *m_socketTimeout =
nullptr;
101 ProtocolHttp *m_protoHttp =
nullptr;
103 ProtocolFastCGI *m_protoFcgi =
nullptr;
104 int m_runningServers = 0;
105 int m_serversTimeout = 0;