|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectgames.strategy.net.IPFinder
public class IPFinder
| Constructor Summary | |
|---|---|
IPFinder()
|
|
| Method Summary | |
|---|---|
static java.net.InetAddress |
findInetAddress()
We iterate through an enumeration of network interfaces on the machine and picks the first IP that is not a loopback and not a link local and not private. |
static void |
main(java.lang.String[] args)
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public IPFinder()
| Method Detail |
|---|
public static java.net.InetAddress findInetAddress()
throws java.net.SocketException,
java.net.UnknownHostException
java.net.SocketException - required by InetAddress
java.net.UnknownHostException - required for getLocalHost()
public static void main(java.lang.String[] args)
throws java.net.SocketException,
java.net.UnknownHostException
java.net.SocketException
java.net.UnknownHostException
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||