KD SOAP: src/KDSoapServer/KDSoapThreadPool.h Source File

| KD SOAP 1.9.1

KDSoapThreadPool.h
1 /****************************************************************************
2 ** Copyright (C) 2010-2020 Klaralvdalens Datakonsult AB, a KDAB Group company, info@kdab.com.
3 ** All rights reserved.
4 **
5 ** This file is part of the KD Soap library.
6 **
7 ** Licensees holding valid commercial KD Soap licenses may use this file in
8 ** accordance with the KD Soap Commercial License Agreement provided with
9 ** the Software.
10 **
11 **
12 ** This file may be distributed and/or modified under the terms of the
13 ** GNU Lesser General Public License version 2.1 and version 3 as published by the
14 ** Free Software Foundation and appearing in the file LICENSE.LGPL.txt included.
15 **
16 ** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
17 ** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
18 **
19 ** Contact info@kdab.com if any conditions of this licensing are not
20 ** clear to you.
21 **
22 **********************************************************************/
23 #ifndef KDSOAPTHREADPOOL_H
24 #define KDSOAPTHREADPOOL_H
25
26 #include <QtCore/QObject>
27 #include <QtCore/QHash>
28 #include "KDSoapServerGlobal.h"
29 class KDSoapServer;
30
39 class KDSOAPSERVER_EXPORT KDSoapThreadPool : public QObject
40 {
41 Q_OBJECT
42 public:
46 explicit KDSoapThreadPool(QObject *parent = 0);
47
51 ~KDSoapThreadPool();
52
59 void setMaxThreadCount(int maxThreadCount);
60
64 int maxThreadCount() const;
65
69 int numConnectedSockets(const KDSoapServer *server) const;
70
76 int totalConnectionCount(const KDSoapServer *server) const;
77
82 void resetTotalConnectionCount(const KDSoapServer *server);
83
87 void disconnectSockets(KDSoapServer *server);
88
89 private:
90 friend class KDSoapServer;
91 void handleIncomingConnection(int socketDescriptor, KDSoapServer *server);
92 class Private;
93 Private *const d;
94 };
95
96 #endif // KDSOAPTHREADPOOL_H
KDSoapServer
Definition: KDSoapServer.h:43
KDSoapThreadPool
Definition: KDSoapThreadPool.h:40

Klarälvdalens Datakonsult AB (KDAB)
"The Qt, C++ and OpenGL Experts"
https://www.kdab.com/
https://www.kdab.com/development-resources/qt-tools/kd-soap/