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();
46 QMutex m_socketListMutex;
47 KDSoapSocketList *socketListForServer(
KDSoapServer *server);
48 typedef QHash<KDSoapServer *, KDSoapSocketList *> SocketLists;
49 SocketLists m_socketLists;
51 QAtomicInt m_incomingConnectionCount;
54 class KDSoapServerThread :
public QThread
58 explicit KDSoapServerThread(QObject *parent = 0);
59 ~KDSoapServerThread();
64 int socketCount()
const;
65 int socketCountForServer(
const KDSoapServer *server)
const;
66 int totalConnectionCountForServer(
const KDSoapServer *server)
const;
67 void resetTotalConnectionCountForServer(
const KDSoapServer *server);
69 void disconnectSocketsForServer(
KDSoapServer *server, QSemaphore &semaphore);
70 void handleIncomingConnection(
int socketDescriptor,
KDSoapServer *server);
73 virtual void run()
override;
78 KDSoapServerThreadImpl *d;
79 QSemaphore m_semaphore;
82 #endif // KDSOAPSERVERTHREAD_P_H Definition: KDSoapServer.h:35