I am using the http server example as a basic data server and QAccessManager in the test client application.

The client app contains the following code:

1, connect(mAccessManager, SIGNAL(finished(QNetworkReply *)), this, SLOT(FinishedPost(QNetworkReply*)));

2. if (postMsg == true)
3. {
4. mNetworkReply = mAccessManager->post(request, mPostMsgData);
5. }
6. else
7. {
8. mNetworkReply = mAccessManager->put(request, mPostMsgData);
9. }

10. if (mNetworkReply != NULL)
11. {
12. connect(mNetworkReply, SIGNAL(readyRead()), this, SLOT(NetworkReadyRead()));
13. // connect(mNetworkReply, SIGNAL(finished()), this, SLOT(FinishedRead()));

14. connect(mNetworkReply, SIGNAL(error(QNetworkReply::NetworkError)), this,
SLOT(NetworkErrors(QNetworkReply::NetworkError)));

I try either line 1 or line 13.

Neither finished is triggered unless the server sends an explicit message back not just an ACK.


In the server (httprequesthandler.cpp) I have the following code

connect(mTcpSocket, SIGNAL(readyRead()), this, SLOT(NetworkReadyRead()));
connect(mTcpSocket, SIGNAL(finished()), this, SLOT(FinishedRead()));
connect(mTcpSocket, SIGNAL(disconnected()), SLOT(Disconnected()));


FinishedRead is never called to tell me that the complete message has been received. I look at the length specified in the header and read until I get that many bytes. Several time however packets appear to be resent. I will get a complete file based on the size in the header and then I get more data sometime even the entire message all over again.

What handshaking has to be done to tell both apps when the message transfer is complete. the test message is a 40M tiff image. Is it possible that size is a limiting factor? For what its work we are using wired network connections not wireless so it is not a signal issue.


Bruce