Post by Stefan Bruchich versuche über ein Applet zu ermitteln, ob bestimmte Web- oder
FTP-Server online sind.
Kennt jemand einen funktionierenden Ansatz dazu?
Seit 1.5 hat java.net.InetAddress eine Methode isReachable, die aber
keine Sicherheit garantiert:
== API-Docs
Test whether that address is reachable. Best effort is made by the
implementation to try to reach the host, but firewalls and server
configuration may block requests resulting in a unreachable status
while some specific ports may be accessible. A typical implementation
will use ICMP ECHO REQUESTs if the privilege can be obtained,
otherwise it will try to establish a TCP connection on port 7 (Echo)
of the destination host.
The timeout value, in milliseconds, indicates the maximum amount
of time the try should take. If the operation times out before getting
an answer, the host is deemed unreachable. A negative value will
result in an IllegalArgumentException being thrown.
==
Gruß,
Marco
--
Bitte nur in der Newsgroup antworten, nicht per Email!
de.comp.lang.java Homepage: http://www.dclj.de/
FAQ: http://www.faqs.org/faqs/de/comp-lang-java/faq/
Meine Java-Seiten: http://www.geocities.com/marcoschmidt.geo/java.html