473,624 Members | 2,685 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

how to measure download/upload speed? (programming, C#)

7 New Member
Hello all,

I have a question, how do i measure the download/upload speed... as if download rate, upload rate or kbps transfer rate.
i want to do my own windows application using C# to measure the download speed.

the idea is this.
1. i will put a file at a serverA.
2. i download the file
3. i measure the speed of the download(how long it would take me to complete the download)

the question:
1. how do i calculate the transfer time? the speed..?
Jun 15 '07 #1
4 12849
kenobewan
4,871 Recognized Expert Specialist
Welcome to TSDN. One way would to take the time at the start and measure the datetime diff when finished. HTH.
Jun 15 '07 #2
halimunan
7 New Member
Welcome to TSDN. One way would to take the time at the start and measure the datetime diff when finished. HTH.

hrm.. okay... i know how to measure the difference between two time..

but how do i set the starting point when the download start... and of course when the download completed.

DateTime startTime = DateTime.Now; <--- where should i put this?
DateTime stopTime = DateTime.Now; <--- and where should i put this?


i mean.. maybe start time i can put it when i click the download/upload button...
but how do i get the completed time?
Jun 22 '07 #3
kenobewan
4,871 Recognized Expert Specialist
I suggest placing them at the begining and end of the on click function, usually with a popup to say that the download has finished and a time diff before to calculate. HTH.
Jun 22 '07 #4
userkv
1 New Member
I'm facing a similar problem. Here is the scenario. I have a server component in C# from where files will be downloaded using a C# client.

Once the download starts, I need to show the current transfer rate and the estimated time to completely download the file. Again, I need to show this information as soon as the download starts and not at the end of the download process.

Also, is there any way to restrict the bandwidth for a socket programmaticall y?

Thanks in advance.
Aug 28 '07 #5

Sign in to post your reply or Sign up for a free account.

Similar topics

4
5644
by: - - Pierre | last post by:
Hi all, I'm trying to come up with a script and I'm having a heck of a time... I require users to enter the size (in MB or KB) of the attachment they wish to transfer/upload. As they enter the number and move over to the next field (using onBlur or...), I would like a popup/alert window warning them that this attachment size would take "x" amount of time based on a speed of 24 kilobits per second (kbps). If they are happy with the...
1
2085
by: Serdar C. | last post by:
i am trying to write a program to control upload and download speeds over specific ports like i have 128kbit download and 64kbit upload speed total.. i want to let port xxxx to use maximum amount of 32kbit upload speed at all.. i saw programs doin that (i.e overnet) how can i do that i dont know where to look for this program never found something about this at msdn..? anyone knows?
3
6912
by: Gary O'Malley | last post by:
Everytime I download a file from the web I get a nice animated dialogue box that shows the size of the file, how much has been received and the approximate remaining time. It also gives the connection bandwidth. I've looked in different development groups through google/groups to find an example of C # code that would give me a similar readout. The closest I've come is my local web developer says the Internet Explorer is the application...
3
5034
by: Mike Kelly | last post by:
Hi. I've built a page using standard ASP.NET 2.0 features and when I upload a large file (>20MB) to our intranet server, I get a paltry 100KB/s on our 100Mb/s LAN. Simply copying the file, I get around 7MB/s. I'm using a FileUpload control on an .aspx page, and then I'm writing the MyFileUpload.PostedFile.InputStream off to a database. What can I do to speed up this uploading? Thanks in advance
0
1451
by: Preben Zacho | last post by:
Anyone has a simple (if possible) code example that demonstrates how to measure the down- and upload speed of your internet connection? Cheers PZ
1
47439
KevinADC
by: KevinADC | last post by:
Note: You may skip to the end of the article if all you want is the perl code. Introduction Many websites have a form or a link you can use to download a file. You click a form button or click on a link and after a moment or two a file download dialog box pops-up in your web browser and prompts you for some instructions, such as “open” or “save“. I’m going to show you how to do that using a perl script. What You Need Any recent...
2
5172
dlite922
by: dlite922 | last post by:
I have an intranet LAMP server and I use PHP to upload files. It is of course faster to download the same file than to upload it. I understand ISPs throttle their network for download speed, than upload since most people download from the internet vs upload. My question is if it's a local intranet with a couple of users, why is it faster to download the same exact file vs when I uploaded it a minute ago. Does it have to do with HTTP...
5
5857
dlite922
by: dlite922 | last post by:
Before you jump in front of the train, no I don't mean ISP wise. I know providers throttle speed towards download. This is in a two PC LAN and one user. one average PC is a RedHat 'LAMP' server and the other is an XP desktop. The same file that is uploaded is downloaded much faster (ie 1 minutes to upload, 5 seconds to download) Is it just how HTTP file uploads work? is it PHP? I've simplified my code to one file with one form and...
4
8605
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
8251
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
8182
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,...
0
8635
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
7178
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
6115
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
5570
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
4085
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
1
2614
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
1
1800
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.