KD SOAP API Documentation 2.1
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-2023 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
21{
23public:
26
27public Q_SLOTS:
28 void handleIncomingConnection(int socketDescriptor, KDSoapServer *server);
29 void disconnectSocketsForServer(KDSoapServer *server, QSemaphore *semaphore);
30 void quit();
31
32public:
33 int socketCount();
34 int socketCountForServer(const KDSoapServer *server);
37
39
40private:
41 QMutex m_socketListMutex;
42 KDSoapSocketList *socketListForServer(KDSoapServer *server);
44 SocketLists m_socketLists;
45
46 QAtomicInt m_incomingConnectionCount;
47};
48
50{
52public:
53 explicit KDSoapServerThread(QObject *parent = 0);
55
56 void startThread();
57 void quitThread();
58
59 int socketCount() const;
60 int socketCountForServer(const KDSoapServer *server) const;
61 int totalConnectionCountForServer(const KDSoapServer *server) const;
63
64 void disconnectSocketsForServer(KDSoapServer *server, QSemaphore &semaphore);
65 void handleIncomingConnection(int socketDescriptor, KDSoapServer *server);
66
67protected:
68 virtual void run() override;
69
70private:
71 void start(); // use startThread instead
72 void quit(); // use quitThread instead
74 QSemaphore m_semaphore;
75};
76
77#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

© 2010-2023 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 Tue Dec 26 2023 00:00:25 for KD SOAP API Documentation by doxygen 1.9.8