I suggest to use the readyRead() signal to be notified when some data arrive on the socket