Solved...just after the connectToHost I insert an waitForConnected:
socket->connectToHost(hostIp, hostPort);
if (socket->waitForConnected(1000))
qDebug("Connected!");
No I've another kind of problem...After client-server are connected when I sent a message (msg#1) from client to server, the server must response with another message (msg#2) just after the first one but I've a strange behaviour. The msg#1 is received by server with a little bit latency after sended by client (some milliseconds) instead the msg#2 is received by client after 2-3 seconds. why?




Reply With Quote
Bookmarks