I am working in a small project using Qt
My program is a client, connected to server.
I use QTcpSocket.
connect(tcpSocket, SIGNAL(readyRead()), this, SLOT(handleData()));
Client receives data from server in 2 cases :
+) Case 1: Server always send its status
Client receives and only show them.
+) Case 2: When client wants to get some information, client will send a command.
Server will parse the command and return proper informations.
I want that client must wait for receiving data in TIMEOUT seconds.
Because I am using SIGNAL readyRead(), data will be received in another thread.
I can't wait for receiving data from server in case 2.
Can anyone suggest me some ideals ?
Thanks !