22 #ifndef KDSOAPSERVERTHREAD_P_H
23 #define KDSOAPSERVERTHREAD_P_H
30 class KDSoapSocketList;
32 class KDSoapServerThreadImpl :
public QObject
36 KDSoapServerThreadImpl();
37 ~KDSoapServerThreadImpl();
40 void handleIncomingConnection(
int socketDescriptor,
KDSoapServer* server);
41 void disconnectSocketsForServer(
KDSoapServer* server, QSemaphore* semaphore);
47 int totalConnectionCountForServer(
const KDSoapServer* server);
48 void resetTotalConnectionCountForServer(
const KDSoapServer* server);
50 void addIncomingConnection();
52 QMutex m_socketListMutex;
53 KDSoapSocketList* socketListForServer(
KDSoapServer* server);
54 typedef QHash<KDSoapServer*, KDSoapSocketList*> SocketLists;
55 SocketLists m_socketLists;
57 QAtomicInt m_incomingConnectionCount;
60 class KDSoapServerThread :
public QThread
64 explicit KDSoapServerThread(QObject *parent = 0);
65 ~KDSoapServerThread();
70 int socketCount()
const;
71 int socketCountForServer(
const KDSoapServer* server)
const;
72 int totalConnectionCountForServer(
const KDSoapServer* server)
const;
73 void resetTotalConnectionCountForServer(
const KDSoapServer* server);
75 void disconnectSocketsForServer(
KDSoapServer* server, QSemaphore& semaphore);
76 void handleIncomingConnection(
int socketDescriptor,
KDSoapServer* server);
84 KDSoapServerThreadImpl* d;
85 QSemaphore m_semaphore;
88 #endif // KDSOAPSERVERTHREAD_P_H