I've started a very small project called jPingy. Aiming to make it nice and easy to construct, execute and analyse ping requests and pong answers. Published under the MIT OpenSource software license, the library can be used in proprietary software. Any contributions, remarks, tips, ideas are very welcome! Project page: http://code.google.com/p/jpingy/
Here you can already see some sample code. The syntax might (very probably) change during development becoming cleaner and more efficient. Suggestions are always welcomePingArguments arguments = new PingArguments.Builder().url("google.com") .timeout(5000).repeat(2).bytes(32).build(); PingResults results = Ping.ping(arguments,Backend.UNIX); System.out.println(results.ttl()); System.out.println(results.rtt_min()); System.out.println(results.received()); -- /* Output: TTL: 52 RTT Minimum: 17.036 Received : 2 */
- Get a list of individual ping requests and use data of it
Meaning that if you make 5 ping requests, that you can analyse each ping request individually
read ping statistics: rtt average, time,..
Features in development
- Backend for windows
Currently it will only work with the ping command on most unix machines (including android)
Let me know what you think. And any help (idea or code) is appreciated!