Sending whole file at a time in tcp communication
General and Desktop
3
Posts
3
Posters
995
Views
1
Watching
-
just use "QTcpSocket::write(QByteArray)":http://qt-project.org/doc/qt-4.8/qiodevice.html#write-3 QTcpSocket derives from QAbstractSocket, which in turn derives from QIODevice.
Of course its not all that easy because you also need to send some meta data info (file type et al) along with the actual file.
Another option would be to use "QNetworkAccessManager::post() ":http://qt-project.org/doc/qt-4.8/qnetworkaccessmanager.html#post