Click here to Skip to main content
Rate this: bad
good
Please Sign up or sign in to vote.
See more: C++ Linux socket Network
Hello guys! I need a source code in C, C++ to test network speed like a speedtest.net..
 
And I need a theory and methods of this tool. For example how to measure the speed.. What I should know to make this tool etc.. Please help me!!
Posted 6-Apr-13 23:29pm
Comments
pasztorpisti at 7-Apr-13 4:57am
   
You can not measure the "speed of the internet". You can measure the speed/quality of a route from one machine to another. Speedtest.net has servers all over the world to test the connection between one of the servers and your machine. The connection is affected by all routers through which your packets are hopping. For a lot of money you can rent a dedicated line for yourself from one location to another, in this case the bandwith and latency of your connection between the two locations can be guaranteed. (some multinational companies do that between their offices). Note that the overall quality of the communication channel is the quality of the worst hop/router in the path of your communication. Your packets may go through superfast routers that are not overloaded on 99.99% of the packet route but if one slow overloaded router gets into the path of your packets then your connection slows down. Another important thing is that usually there are 2 separate values that worth measuring in case of "connection speed": bandwith and latency. Measuring bandwith is straightforward, you send a big bunch of bytes from one machine to another using your protocol (TCP or your custom protocol over UDP) and then you calculate the megabytes per second. You have to send a lot of data as some transfer algorithms (like TCP) start with slow data transfer and reach their max bandwith to avoid network congestion and you want to see as little as possible from this slow start in your averaging. You can write a smart detection that doesn't calculate in the slow start if you have the patience. The latency is usually measured by sending a few udp packets and measuring their roundtrip time. The latency might be affected by the size of the sent/received upd packets.

1 solution

Rate this: bad
good
Please Sign up or sign in to vote.

Solution 1

It doesn't quite work like that.
We do not do your work for you.
If you want someone to write your code, you have to pay - I suggest you go to VWorker.com and ask there.
 
But be aware: you get what you pay for. Pay peanuts, get monkeys
  Permalink  
Comments
Purevochir at 7-Apr-13 4:44am
   
Just examples.. I need theory to measure internet speed help me

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

  Print Answers RSS
0 Mathew Soji 309
1 BillWoodruff 300
2 Afzaal Ahmad Zeeshan 252
3 DamithSL 225
4 Maciej Los 215
0 OriginalGriff 6,249
1 Sergey Alexandrovich Kryukov 5,853
2 DamithSL 5,183
3 Manas Bhardwaj 4,673
4 Maciej Los 3,865


Advertise | Privacy | Mobile
Web02 | 2.8.1411019.1 | Last Updated 7 Apr 2013
Copyright © CodeProject, 1999-2014
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100