Hi anda_skoa,
the problem is fixed!
In the memberfunction 'void IPCServer::readData()'
void IPCServer::readData()
// Byte-Anzahl auslesen ++++++++++++++++++++++++++
if( anzahl == 0)
{ if( client->bytesAvailable() < (int)sizeof(quint16)) return;
in >> anzahl;
}
if( client->bytesAvailable() < anzahl) return;
// Socket auslesen +++++++++++++++++++++++++++++++
in >> data;
// Antwort berechnen +++++++++++++++++++++++++++++
compute( data );
// Antwort senden ++++++++++++++++++++++++++++++++
sendData();
anzahl = 0;
}
void IPCServer::readData()
{ QDataStream in( client );
// Byte-Anzahl auslesen ++++++++++++++++++++++++++
if( anzahl == 0)
{ if( client->bytesAvailable() < (int)sizeof(quint16)) return;
in >> anzahl;
}
if( client->bytesAvailable() < anzahl) return;
// Socket auslesen +++++++++++++++++++++++++++++++
in >> data;
// Antwort berechnen +++++++++++++++++++++++++++++
compute( data );
// Antwort senden ++++++++++++++++++++++++++++++++
sendData();
anzahl = 0;
}
To copy to clipboard, switch view to plain text mode
the Classvariable 'anzahl' are not 0.
Therefor the metode couldn't work.
I forgot to initialising this variable in the constructor.
But the mysterium:
inside QtCreator there is no consequence,
outside QtCreator the consequence is 'no datatransfer',
I don't understand this! But it runs!
Thanks for your time!
GBunge
Bookmarks