I am trying write a server application which reads an mp3 file on the file system & sends it to a client app through QTcpSocket using the following code -
Qt Code:
return; //os.setAutoDetectUnicode(true); os << "HTTP/1.0 200 Ok\r\n" "Content-Type: audio/mpeg; charset=\"utf-8\"\r\n" "\r\n"; os.flush(); // Streaming the file clientSocket->write(block);To copy to clipboard, switch view to plain text mode
The server application crashes when this code is executed. What is the problem in the above code ? Is the method of reading the mp3 file faulty ?
Bookmarks