Class Wol
java.lang.Object
org.harctoolbox.harchardware.comm.Wol
This class sends a wakeup package to a host, given by its MAC address or hostname (provided that it is present in the ethers data base).
-
Field Summary
-
Constructor Summary
-
Method Summary
-
Field Details
-
defaultIP
- See Also:
-
defaultPort
public static final int defaultPort- See Also:
-
-
Constructor Details
-
Wol
- Throws:
IOException
Ethers.MacAddressNotFound
-
Wol
- Throws:
IOException
Ethers.MacAddressNotFound
-
Wol
public Wol(String str, InetAddress ip, int port, File pathname) throws IOException, Ethers.MacAddressNotFound Constructor for Wol.- Parameters:
str
- Either ethernet address or a host name found in the ethers data baseip
- IP address to send to, should be a broadcast address (255.255.255.255)port
- port to send to, normally 9pathname
-- Throws:
FileNotFoundException
- ethers data base file was not found.Ethers.MacAddressNotFound
UnknownHostException
IOException
-
-
Method Details
-
wol
- Throws:
IOException
Ethers.MacAddressNotFound
-
main
-
toString
-
wol
Wakes up the machines with provided Ethernet addresses. The magic sequences are sent to the given host and port.- Throws:
SocketException
IOException
- if an I/O error occurs
-