16 #ifndef KDSOAPSERVERTHREAD_P_H
17 #define KDSOAPSERVERTHREAD_P_H
24 class KDSoapSocketList;
26 class KDSoapServerThreadImpl :
public QObject
30 KDSoapServerThreadImpl();
31 ~KDSoapServerThreadImpl();
34 void handleIncomingConnection(
int socketDescriptor,
KDSoapServer *server);
35 void disconnectSocketsForServer(
KDSoapServer *server, QSemaphore *semaphore);
41 int totalConnectionCountForServer(
const KDSoapServer *server);
42 void resetTotalConnectionCountForServer(
const KDSoapServer *server);
44 void addIncomingConnection();
47 QMutex m_socketListMutex;
48 KDSoapSocketList *socketListForServer(
KDSoapServer *server);
49 typedef QHash<KDSoapServer *, KDSoapSocketList *> SocketLists;
50 SocketLists m_socketLists;
52 QAtomicInt m_incomingConnectionCount;
55 class KDSoapServerThread :
public QThread
59 explicit KDSoapServerThread(QObject *parent = 0);
60 ~KDSoapServerThread();
65 int socketCount()
const;
66 int socketCountForServer(
const KDSoapServer *server)
const;
67 int totalConnectionCountForServer(
const KDSoapServer *server)
const;
68 void resetTotalConnectionCountForServer(
const KDSoapServer *server);
70 void disconnectSocketsForServer(
KDSoapServer *server, QSemaphore &semaphore);
71 void handleIncomingConnection(
int socketDescriptor,
KDSoapServer *server);
74 virtual void run()
override;
79 KDSoapServerThreadImpl *d;
80 QSemaphore m_semaphore;
83 #endif // KDSOAPSERVERTHREAD_P_H