KD SOAP API Documentation 2.2
Loading...
Searching...
No Matches
KDSoapServerThread_p.h
Go to the documentation of this file.
1/****************************************************************************
2**
3** This file is part of the KD Soap project.
4**
5** SPDX-FileCopyrightText: 2010 Klarälvdalens Datakonsult AB, a KDAB Group company <info@kdab.com>
6**
7** SPDX-License-Identifier: MIT
8**
9****************************************************************************/
10#ifndef KDSOAPSERVERTHREAD_P_H
11#define KDSOAPSERVERTHREAD_P_H
12
13#include <QHash>
14#include <QMutex>
15#include <QSemaphore>
16#include <QThread>
17class KDSoapServer;
19
20// clazy:excludeall=ctor-missing-parent-argument
22{
24public:
25 KDSoapServerThreadImpl(); // created on stack, clazy:exclude=ctor-missing-parent-argument
27
28public Q_SLOTS:
29 void handleIncomingConnection(int socketDescriptor, KDSoapServer *server);
30 void disconnectSocketsForServer(KDSoapServer *server, QSemaphore *semaphore);
31 void quit();
32
33public:
34 int socketCount();
35 int socketCountForServer(const KDSoapServer *server);
38
40
41private:
42 QMutex m_socketListMutex;
43 KDSoapSocketList *socketListForServer(KDSoapServer *server);
45 SocketLists m_socketLists;
46
47 QAtomicInt m_incomingConnectionCount;
48};
49
51{
53public:
54 explicit KDSoapServerThread(QObject *parent = 0);
56
57 void startThread();
58 void quitThread();
59
60 int socketCount() const;
61 int socketCountForServer(const KDSoapServer *server) const;
62 int totalConnectionCountForServer(const KDSoapServer *server) const;
64
65 void disconnectSocketsForServer(KDSoapServer *server, QSemaphore &semaphore);
66 void handleIncomingConnection(int socketDescriptor, KDSoapServer *server);
67
68protected:
69 virtual void run() override;
70
71private:
72 void start(); // use startThread instead
73 void quit(); // use quitThread instead
75 QSemaphore m_semaphore;
76};
77
78#endif // KDSOAPSERVERTHREAD_P_H
int totalConnectionCountForServer(const KDSoapServer *server)
void disconnectSocketsForServer(KDSoapServer *server, QSemaphore *semaphore)
void resetTotalConnectionCountForServer(const KDSoapServer *server)
int socketCountForServer(const KDSoapServer *server)
void handleIncomingConnection(int socketDescriptor, KDSoapServer *server)
int socketCountForServer(const KDSoapServer *server) const
void disconnectSocketsForServer(KDSoapServer *server, QSemaphore &semaphore)
int totalConnectionCountForServer(const KDSoapServer *server) const
void resetTotalConnectionCountForServer(const KDSoapServer *server)
virtual void run() override
void handleIncomingConnection(int socketDescriptor, KDSoapServer *server)
Q_OBJECTQ_OBJECT
Q_SLOTSQ_SLOTS
QObject * parent() const const

© 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/
Generated on Sat Apr 20 2024 00:04:25 for KD SOAP API Documentation by doxygen 1.9.8