Alex Snet
17th April 2009, 14:30
Hi!
How I can read and write information to/from socket line by line?
Now I'm doing this:
tcpSocket.waitForReadyRead();
QByteArray request( tcpSocket.readAll() );
But this is incorrect, because program don't wait two "\r\n" and after first write goes next.
PS I'm writing a small HTTP server.
And also one question: how I can get speed of file downloading? And how I can set it? Or how I can abor connection from UI?
How I can read and write information to/from socket line by line?
Now I'm doing this:
tcpSocket.waitForReadyRead();
QByteArray request( tcpSocket.readAll() );
But this is incorrect, because program don't wait two "\r\n" and after first write goes next.
PS I'm writing a small HTTP server.
And also one question: how I can get speed of file downloading? And how I can set it? Or how I can abor connection from UI?