Clarification....is it good or not ?
Unsolved
General and Desktop
-
Hi,
i am realizing a little server for my tchat application
i use the tcpServer and tcpSocket...to represent clientswhen the socket send a message to the server i would to know if i can use this code to know if the server receive all informations sent by clients before treating them :
while (!socket.atEnd())
{
QByteArray data = socket.read(100);
....
}
thanks for anwsers !!!
-
@billy.N
use the bytesAvailable() method before actually consuming the data -
Check page 363 of C++ GUI Programming with Qt 4 for an explanation on how to do this
-
Hi,
There's also the Chat Example that may be of use.