How to calculate the bandwidth of a particular port using socket programming in Java ?
Any sample code please.. Thanks for the help in advance.
How to calculate the bandwidth of a particular port using socket programming in Java ?
Any sample code please.. Thanks for the help in advance.
Hi unfortunately there is no simple solution to this. You will have to actually transfer some data through the socket to determine the bandwidth.
Take a look at the first class in this web page. We use a similar code in our distributed computing cluster:
http://docstore.mik.ua/orelly/java-ent/dist/ch08_04.htm
If you just need to figure out the maximum bandwith of a network device you will most probably need to call platform specific tools (such as ifconfig on Linux) and parse the network link parameters from the tools output.