Important: Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct
Qtcp client not working
hi all.one help
server send a 1000kb of data to client...
i include the code:
//then i opened a file to write a ba to the file ..
only 2kb of content only writing
probably the most common misassumption in in socket programming:
Just because you send 10kb of data from the server doesn't mean that the client receives the 10kb at once. But the client will receive it in chunks.
So you need to read from the socket consecutively until all data is received. Whenever the readyRead() signal is triggered, or you use the blocking approach using waitForReadyRead()
k i will try
Delphi251189 last edited by Delphi251189
/*After the last chunk will been received by client, QAbstractSocket::waitForReadyRead() will return false */
@Delphi251189 inside while statement what to add ?
completed by using while(readyread())..thank for all