Link to home
Start Free TrialLog in
Avatar of Vinod_VijayanVin
Vinod_VijayanVinFlag for India

asked on

Finding Internet Connection Download and Upload rate dynamically

Hello Experts,

        I am currently developing an Voice Chat application that requires to know the upload
 and download rate (in kbps) of the internet connection so that the application can adjust the
 voice communication accordingly. It can be also used to show that the network bandwidth
 available at a particular time is not suitable for two-way voice communication. Is there any
 VC code available to do the same.
Avatar of nonubik
nonubik

To find the actual ul/dl rate you can try a conenction from client to server and make a quick counter on ul/dl files rate.
Avatar of Vinod_VijayanVin

ASKER

Thanks nonubik for yur help,

    I have to actually find the net activity taking place at any instant and determine how
    much bandwidth is available to me before  sending any data. Because i
    require information like total upload bandwidth and download bandwidth available
    at a instant so that i cn determine the quantity of data to send and accept.
Then you can use a 'calibrating' stage. You can send and receive chunks of data to/from the server for short amount of time and compute the rate.
But this can be relative as the user may be in the middle of some large download and the dload rate you'll compute will be smaller than the usual, or the reverse, as you'll compute some dload rate but while your app runs the user decides to do some dload.

  nonubik, there are bandwidth monitors available that detect and display the internet activity
  taking place at the client. I am amazed at how they do that. They certainly do not send any data
  across the internet for doing that. I want to use the same mechanism. I want to compute the
  available bandwidth every time i send a packet.
 
  I have found the answer to the problem.
  They are many ways to implement bandwidth monitor.

  1.   The most prominent of them are either to put the adapter in  promiscuous mode.
        Promiscuous mode is a special reception mode where an adapter will receive all frames on
       the ring, not just frames are addressed to that adapter which is an disadvantage.

  2.  The other way is to implement a Dll hook that will notify our function whenever calls are made
       to transfer or receive network data
       http://www.hollistech.com/Resources/IpHook/hts_iphook.htm
       OR
       by implementing a Winsock2 Layered Service Provider
       http://www.microsoft.com/msj/0599/LayeredService/LayeredService.aspx
     
 

 
 
 

  As i have given the solution i request the moderator to close the question and award the
  points to me.
ASKER CERTIFIED SOLUTION
Avatar of modulo
modulo

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial