Hi everyone!
I wanna to cauate how many bytes be send or received by my app from GPRS, but I can't find the apis,
Is everyone can help me?
Thanks a lot!
Hi everyone!
I wanna to cauate how many bytes be send or received by my app from GPRS, but I can't find the apis,
Is everyone can help me?
Thanks a lot!
Have you checked the log counters already: http://wiki.forum.nokia.com/index.ph...g_Counters_API
maybe you could then check it with RConnectionMonitor, it is supported from 2nd FP2.
You could just count the bytes as they come in then. anyway, next time Do specify all your requirements and limitations beforehand, othervise is it really disencouraging trying to help you, when you just come up with new stuff that disqualifies the answers given to you.
You could just count the bytes as they come in then
----------------------
Sorry, I don't totally understand. I use the HTTP framework supported by SDK, and I need to get how many bytes be SENT or RECEIVED by my app. and I need to run my app in both 2nd and 3rd.
I plan to do it like this: I will check the log counters before and after data transfer(like this: GetBytesCount(byte1); SendRequest(); GetBytesCount(byte2); bytes = byte2 - byte1. but methods in RConnectionMonitor are asynchronous.
Thanks very much for your help. I'm so sorry that my English is so poor.
Which HTTP APIs are you using ?
How is the data sent with it ?
And how are you receiving the data ?
send request:
-----------------------------
RHTTPHeaders hdr = iTransaction.Request().GetHeaderCollection();
SetHeaderL(hdr, HTTP::EUserAgent, KUserAgent);
SetHeaderL(hdr, HTTP::EAccept, KAccept);
SetHeaderL(hdr,HTTP::EAcceptEncoding, KGZipEncoding);
MHTTPDataSupplier* dataSupplier = this;
iTransaction.Request().SetBody(*dataSupplier);
SubmitL();
-----------------------------
data receive: using MHFRunL(RHTTPTransaction aTransaction,const THTTPEvent& aEvent) function.
I don't know how to get the total HTTP package size, including HTTP Headers and Body. OR is there any APIs I can use to count my data transfer size?
Thanks a lot!
I'm rather sure all the information could be got from the MHFRunL, so just debug and see what comes there, and then have a member variable in which you could try storing the data counters..
I told you two different methods, which you just didn't like.