Click here to Skip to main content
16,012,468 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi,

I'm connected to my wifi network through my Laptop, so my task is to obtain the download and the Upload volume of a Website with C# ?? ( for example: Web site: www.youtube.com - ulpoad: 1254 - download: 25415)

Best regards

Yassine
Posted

Hello,

You might find following articles useful. What you are really trying to achieve requires access to a network packet. Once a packet is captured then you can determine whether it's a http packet and if so then proceed with your analysis and compute the number of bytes uploaded and downloaded.


Many more great articles can be found here[^].

Regards,
 
Share this answer
 
Comments
benhadi 20-Jun-13 11:48am    
thanks for your reply, and your response, but the source code doesn't work from the previous URL.
Use HttpWebRequest.Headers[^] to make up headers.
And HttpWebRequest.ContentLength[^], which Gets or sets the Content-length HTTP header
 
Share this answer
 
Comments
benhadi 20-Jun-13 8:05am    
thanks for your reply, but how can I get the data received(download), because the previous example are for the data sent(upload) ?

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900