removed recursive lock in server; moved object serialisation to worker thread

This commit is contained in:
Max-Wilhelm Bruker 2012-10-14 13:19:03 +02:00
parent e7fc3b59a7
commit 43d7cf6a1a
6 changed files with 52 additions and 38 deletions

View file

@ -54,18 +54,19 @@ class ServerSocketInterface : public Server_ProtocolHandler
private slots:
void readClient();
void catchSocketError(QAbstractSocket::SocketError socketError);
void flushOutputBuffer();
void flushOutputQueue();
signals:
void outputBufferChanged();
void outputQueueChanged();
protected:
void logDebugMessage(const QString &message);
private:
QMutex outputBufferMutex;
QMutex outputQueueMutex;
Servatrice *servatrice;
Servatrice_DatabaseInterface *sqlInterface;
QTcpSocket *socket;
QByteArray inputBuffer, outputBuffer;
QByteArray inputBuffer;
QList<ServerMessage> outputQueue;
bool messageInProgress;
bool handshakeStarted;
int messageLength;