ping : Java Glossary

go to home page P words local find full screen, hide local find menu Google search web for more information on this topic jump to foot of page translate this page with Babelfish by Roedy Green ©1996-2008 Canadian Mind Products
index page for letter ⇒ punctuation 0-9 A B C D E F G H I J K L M N O P Q R S T U V W X Y Z (all)
ping
Ping is a common unix and Windows utility. You give it a domain name or IP and it tells you the corresponding IP, and whether that site is up or not. It is the smaller brother of TraceRt that tells you about all the hops necessary to reach that destination. The other function of ping it to determine how long it takes to send a packet and get a response. You might ping several alternate sources and use the one with the shortest ping. Napster automatically displays ping times for all potential downloads.

According to Wayne Kovsky, ping implementations rely on ICMP (Internet Control Message Protocol), which is a low-level protocol designed for network administration and not supported in Java. Java supports the higher level datagrams and TCP/IP streams.

But, you can simulate the functionality of ping, by opening a socket to the host and sending a message to some known port. This technique (with sample source code) is described in Peter van der Linden’s book. It will probably be sufficient for your requirements, even though it is not a real ping.

You can use ping to estimate how many of your packets are getting through the first time.

rem Ping continuously with 1000 byte packets.

ping somewebsite.com  -t -1 1000

rem results will tell you of any errors, sorry no accumulated stats.
book cover recommend book⇒Just Java 2, Sixth Edition
 paperback
ISBN13:978-0-13-148211-1clickcounter
ISBN10:0-13-148211-4clickcounter
publisher:Prentice Hall
published:2004-07-01
by:Peter van der Linden
Covers Java 5 aka 1.5. Peter has a sense of humour and breaks the drudgery of reading with a funny story at the end of each chapter. He explains through simple examples. This is a book you can sit down and read and not fall asleep. I helped edit and proofread the chapters on enums and genericity.
UK flag abe books.co.uk abe books.ca Canadian flag
UK flag amazon.co.uk. amazon.ca. Canadian flag
German flag abe books.de chapters.indigo.ca . Canadian flag
German flag amazon.de. abe books.com American flag
French flag abe books.fr amazon.com. American flag
French flag amazon.fr. barnes and noble.com American flag
Italian flag abe books.it powells.com American flag
Spanish flag iberlibro.com abe books anz Australian flag
To avoid denial of service attacks, some sites ignore pings. In that case you must use tracert. It takes much longer, and so is less useful for hassling a server.

CMP homejump to top
CMP logo
feedback Please email your feedback for publication, errors, omissions, broken/redirected link reports
and suggestions to improve this page to Roedy Green : feedback email
made with CSS
HTML Checked!
ICRA ratings logo
mindprod.com IP:[65.110.21.43]
Your face IP:[38.103.63.59] Visit care2.org
You are visitor number 13,054.
You can get a fresh copy of this page from: or possibly from your local J: drive (Java virtual drive/mindprod.com website mirror)
http://mindprod.com/jgloss/ping.html J:\mindprod\jgloss\ping.html