QNetworkAccessManager in/out data counter
Is there any way to count in/out data size (up to a byte) which was transmitted trough QNetworkAccessManager?
Without using 3rd-party proxy server or something similar.
You could do this using a QNAM proxy possibly coupled with a custom QNetworkReply. Take a look at this "blog entry":http://blogs.kde.org/node/4210 and the next couple by Rich Moore to get an idea of how you can customise QNAM and friends.
The problem is that you have little or no control about how many bytes are actually transmitted "on the wire", considering f.i. gzip compression, chunked encoding, encryption, proxies, etc.
If you're willing to patch Qt of course you have complete control on the underlying sockets, so you can get some counters from them.
ZapB, thanks, interesting blog. I'll try to apply a method described there.
peppe, unfortunately a patching Qt isn't allowed. But that is a really powerful solution :)
You could also try using process accounting built into the OS. It depends exactly what you want to do.
Just have QNetworkAccessManager and a couple of get/post requests. And want to have some connection info - count of rx/tx data.