23 #ifndef KDSOAPSERVERTHREAD_P_H 24 #define KDSOAPSERVERTHREAD_P_H 31 class KDSoapSocketList;
33 class KDSoapServerThreadImpl :
public QObject
37 KDSoapServerThreadImpl();
38 ~KDSoapServerThreadImpl();
41 void handleIncomingConnection(
int socketDescriptor,
KDSoapServer *server);
42 void disconnectSocketsForServer(
KDSoapServer *server, QSemaphore *semaphore);
48 int totalConnectionCountForServer(
const KDSoapServer *server);
49 void resetTotalConnectionCountForServer(
const KDSoapServer *server);
51 void addIncomingConnection();
53 QMutex m_socketListMutex;
54 KDSoapSocketList *socketListForServer(
KDSoapServer *server);
55 typedef QHash<KDSoapServer *, KDSoapSocketList *> SocketLists;
56 SocketLists m_socketLists;
58 QAtomicInt m_incomingConnectionCount;
61 class KDSoapServerThread :
public QThread
65 explicit KDSoapServerThread(QObject *parent = 0);
66 ~KDSoapServerThread();
71 int socketCount()
const;
72 int socketCountForServer(
const KDSoapServer *server)
const;
73 int totalConnectionCountForServer(
const KDSoapServer *server)
const;
74 void resetTotalConnectionCountForServer(
const KDSoapServer *server);
76 void disconnectSocketsForServer(
KDSoapServer *server, QSemaphore &semaphore);
77 void handleIncomingConnection(
int socketDescriptor,
KDSoapServer *server);
80 virtual void run()
override;
85 KDSoapServerThreadImpl *d;
86 QSemaphore m_semaphore;
89 #endif // KDSOAPSERVERTHREAD_P_H Definition: KDSoapServer.h:42