I'd like to log the lifetime of a QNetworkReply object. This includes:
- When the underlying socket connection is established
- When the first byte of the request is sent
- When the first byte of the response received
- When the last byte of the response finished
(3) and (4) can be determined by listening for the downloadProgress signal, but I'm not sure how to do (1) and (2). Is there a way to listen on the underlying socket of a QNetworkReply? The uploadprogress signal doesn't seem to be triggered for GET requests.
As far as I know Qt does not expose mechanism used by
QNetworkAccessManager
to get data so I think you can't accomplish neither the first nor the second task from your list.Please remember that
QNetworkAccessManager
handles not onlyhttp(s):
schemes but also local ones likefile:
andqrc:
which do not require any socket connection.