Faire un ping ???

Fermé
gorby - 30 avril 2002 à 09:57
 gorby - 30 avril 2002 à 12:03
salut, je cherche a construire un objet en java pour faire un ping, qui peut m'aider avec un exemple SVP ???

1 réponse

salut,
j´espere que ca peut t´aider

----------------------------------------------------------------------------
getAllByName
public static InetAddress[] getAllByName(String host)
throws UnknownHostException
Determines all the IP addresses of a host, given the host's name. The host name can either be a machine name, such as "java.sun.com", or a string representing its IP address, such as "206.26.48.100".
If there is a security manager and host is not null and host.length() is not equal to zero, the security manager's checkConnect method is called with the hostname and -1 as its arguments to see if the operation is allowed.

Parameters:
host - the name of the host.
Returns:
an array of all the IP addresses for a given host name.
Throws:
UnknownHostException - if no IP address for the host could be found.
SecurityException - if a security manager exists and its checkConnect method doesn't allow the operation.
See Also:
SecurityManager.checkConnect(java.lang.String, int)
-------------------------------------------------------------------------
0
merci, je vais essayer !!
0