473,785 Members | 2,830 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

internet speed


I want to detect the internet speed using C# to show the user on what speed
he's connecting to internet?

Jul 12 '07 #1
6 6255
That is usually written in the ISP's monthly bill.

--
Sheng Jiang
Microsoft MVP in VC++
"Jassim Rahma" <jr****@hotmail .comwrote in message
news:E4******** *************** ***********@mic rosoft.com...
>
I want to detect the internet speed using C# to show the user on what
speed
he's connecting to internet?

Jul 12 '07 #2
On Fri, 13 Jul 2007 12:36:49 -0700, Jassim Rahma <jr****@hotmail .com>
wrote:
well, if you connect to internet, move the cursor to the icon on the
system tray and you will see that you are connect with 64K or 32K or
120K or whatever, that's what I want to get calculated..
If you are using a dial-up adapter, it is true that many of the modem
drivers will report their actual connect speed. Similarly, a wireless
network drive _may_ report it's current connect speed.

But this information isn't useful generally, because only certain devices
report the speed that the device is actually connected at (for example,
some wireless adapters always look like 10Mbps devices, or 54Mbps devices,
or some other default value), _and_ in addition the speed that the device
is aware of may not be the actual Internet connection speed anyway (so
even if the device always reported as accurate information as it has, that
still won't tell you what you say you want to know).

As I wrote before: the only thing you can do to reliably know the
information you say you want to know is to measure it directly.

Pete
Jul 13 '07 #3

the problem here is that the ISP is always promising the highest speend when
the delivered speed is not even to the half, that's why they provided a
website to show the user what is thier current internet speed at:

http://www.inetsupport.com.bh/meter/

and i just need to do the same using C#..

"Peter Duniho" <Np*********@nn owslpianmk.comw rote in message
news:op******** *******@petes-computer.local. ..
On Fri, 13 Jul 2007 12:36:49 -0700, Jassim Rahma <jr****@hotmail .com>
wrote:
>well, if you connect to internet, move the cursor to the icon on the
system tray and you will see that you are connect with 64K or 32K or
120K or whatever, that's what I want to get calculated..

If you are using a dial-up adapter, it is true that many of the modem
drivers will report their actual connect speed. Similarly, a wireless
network drive _may_ report it's current connect speed.

But this information isn't useful generally, because only certain devices
report the speed that the device is actually connected at (for example,
some wireless adapters always look like 10Mbps devices, or 54Mbps devices,
or some other default value), _and_ in addition the speed that the device
is aware of may not be the actual Internet connection speed anyway (so
even if the device always reported as accurate information as it has, that
still won't tell you what you say you want to know).

As I wrote before: the only thing you can do to reliably know the
information you say you want to know is to measure it directly.

Pete
Jul 13 '07 #4
On Fri, 13 Jul 2007 13:25:03 -0700, Jassim Rahma <jr****@hotmail .com>
wrote:
the problem here is that the ISP is always promising the highest speend
when the delivered speed is not even to the half, that's why they
provided a website to show the user what is thier current internet speed
at:

http://www.inetsupport.com.bh/meter/

and i just need to do the same using C#..
So what part of my previous answer are you having difficulty understanding?
Jul 13 '07 #5
Jassim Rahma wrote:
the problem here is that the ISP is always promising the highest speend
when the delivered speed is not even to the half, that's why they
provided a website to show the user what is thier current internet speed
at:

http://www.inetsupport.com.bh/meter/

and i just need to do the same using C#..
Try with some code like:

using System;
using System.Net;

namespace E
{
public class MainClass
{
public static double Speed(string url)
{
WebClient wc = new WebClient();
DateTime dt1 = DateTime.Now;
byte[] data = wc.DownloadData (url);
DateTime dt2 = DateTime.Now;
return (data.Length * 8) / (dt2 - dt1).TotalSecon ds;
}
public static void Main(string[] args)
{
Console.WriteLi ne("speed to somewhere in Bahrain = " +
Speed("http://www.inetsupport .com.bh/meter/initialmeter.ph p")/1000 + "
Kbit/s");
Console.ReadLin e();
}
}
}

It is obvious that you can not get a speed that are faster than your
internet connection.

But it is also obvious that you can get a speed that is much lower than
your internet connection, if the bottleneck between you and the server
are not your internet connection.

The program above gives a speed about 1/25 of my actual internet speed.
But then I am also a bit away from Bahrain, so I am not surprised.

Arne
Jul 15 '07 #6
If you are not connected via router (in which case the router should be
able to tell you what you want to know), you can try DUMeter from here:
http://www.dumeter.com/

Regards,
Nicolas

*** Sent via Developersdex http://www.developersdex.com ***
Jul 16 '07 #7

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

13
23073
by: Yang Li Ke | last post by:
Hi guys, Is it possible to know the internet speed of the visitors with php? Thanx -- Yang
2
4261
by: Abubakar | last post by:
Hi, I have a small sockets application and I'm adding a feature in it to transfer files. Since I also want to give it a transfer resume feature so this means I'll be transfering in specific bytes per pass. I want to know the local LAN or, if or internet, internet connection speed like 5k/s or 50k/s (as we see in the downloads of IE) so that I can pass that amount of data in write method of networkstream object. So how do I get the speed...
19
4348
by: Mark 123 | last post by:
I just read at http://groups.google.com/group/microsoft.public.access.forms/browse_frm/thread/766ba7b493eacb63/8a7d5504ee848c21?lnk=st&q=migrate+access+97+to+access+2007&rnum=1#8a7d5504ee848c21 that if you have a spilt db using SQL server rather than jet, the front-end's can connect to the backend SQL server over the internet. Has anyone had experience with this? We are thinking of migrating an commercially sold Access97 runtime app to...
2
1878
by: shalin123 | last post by:
The problem is with the Internet speed in our house. we have a 10 Mbps connection which is used by around 10 people. When anyone used to download stuff using torrents the internet speed used to crash for everyone so we decided to give static IP to everyone's computer. It was working fine but one guy did some settings to his computer like he never has problem with Internet speeds ever. like past six months everyone else is having problems...
4
2508
by: OgaW | last post by:
Hey somebody, Is there any way to increase internet speed at 512kbps for download, 256 for upload other than pay ISP more money or adding more memory? Like change certain registry setting or software that drive and optimize the hardware performance? Will monitor whether is a LCD or CRT can affect the internet speed performance?
3
2075
by: mayflower | last post by:
Hi guys, Please help me in retrieving(CODE)for the bandwidth speed of internet connection in Asp.net(Csharp code). Thank you, Kranthikiran
2
2092
by: pavanip | last post by:
Hi, I have an application like Optimize System Performance by using Memory speed, cpu speed and Disk speed. How to optimize memory speed,disk optimization and CPU optimization. Please provide me some sample source code to optimize system performance. Thanks pavani
15
2729
by: ingejg | last post by:
I am starting to study internet synchronization, and my head is still spinning since internet is not my forte, however my boss is breathing down my neck at the moment. Our company has only one server with fixed IP address provided by our ISP, while the other sites (which I wish in the future hold the replicas databases) have only standard internet connections with Dynamic IP (which means that they change IP addresses, as given by the ISP...
4
8622
by: nestle | last post by:
I have DSL with a download speed of 32MB/s and an upload speed of 8MB/s(according to my ISP), and I am using a router. My upload speed is always between 8MB/s and 9MB/s(which is above the max upload speed), ALWAYS. However, my download speed doesn't go over 25MB/s. And when my brother turns on the internet from his computer and takes up half the download/upload speeds (routers automatically split the speeds in two when two computers are using...
0
9645
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9480
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
1
10093
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
9952
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
1
7500
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6740
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5511
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4053
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
3654
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.