No. The client example code was even driven, no need to call any waitForXYZ. Whenever something happens on the socket, e.g. data received, a signal will be emitted and the client code reacts to that. In the example code it reads the available data and appends it to the file.
Your modification effetively blocks the ClientReadData() method until all data has been transferred, totally blocking the thread that executes it, needlessly introducing the need for a thread in order not to block the main thread.
There is no need for threading here at all, it just complicates the two programs and makes them harder to debug.
Cheers,
_
Bookmarks