Data Transmitted

  • Thread starter Thread starter Mark Irvine
  • Start date Start date
M

Mark Irvine

Hi,

I was wondering if it is possible to determine how much data is transmitted
between two points. Basically I am developing a small data driven
application that will run on a Pocket PC 2003 device (.net compact
framework). The data is requested via a collection of web services running
on one of our servers. An additional feature, that has been requested, is
to know how much data is exchanged between each device. I am new to mobile
development and an not even sure if this is possible with the compact
framework. Can anyone suggest an approach, perhaps a code fragment?

Mark
 
Well, you could decide how many bytes you were going to send or receive
yourself, if you were using sockets to do it, but, if you're using Web
services or something, that won't work.

You can use SNMP (Simple Network Management Protocol), remotely, to get it,
if the PPC is running SNMP. Alternatively, you can ask the NDIS driver for
the information, although it may not include point-to-point bytes sent (it
might only include number of bytes sent by you and received by you in total,
not by who you sent it to).

Give us a few more details and we can probably suggest where to go next.

Paul T.
 
Paul,

Many thanks for your reply. The application in question is a scheduling
application for a group of engineers. The idea is that they request a
schedule at the beginning of the day, and as they work through it send
confirmation back to the office. It would be very useful to compare the
amount data exchanged with the GPRS bill. I understand that they will not
match up excatly, but a large difference could indicate a problem of some
sort.

Like I said below, I have not used any mobile development kit before and am
unsure how to proceed. The devices to be used is the new xda2. Would
recording the size of SOAP requests, both in and out, be a good approach? Is
this possible?

Mark
 
I think you're going to have to experiment with several ways of figuring out
how much data is transferred and just see which one works the best. I don't
know how billing works on those systems, but it might charge based on bytes,
in which case the size of the data you're trying to send is probably going
to be swamped by the packet wrapper information TCP/IP attaches. Or, it
might be that you're only charged for the real data (the packet content), in
which case measuring the soap requests would work.

If you really need total bytes, you'll need to ask NDIS for that. I have
not actually tried this, but it appears that you can use NDISUIO, sending
the IOCTL_NDISUIO_NIC_STATISTICS message, to get a structure back from NDIS
containing information on bytes sent, received, etc. over a given network
adapter. I'd recommend that, if you are going to use this, you write a DLL
to handle the operation and just return the interesting data to the managed
code, rather than trying to P/Invoke the whole thing (it's possible, but
harder than a simple DLL in C/C++).

Paul T.
 
Back
Top