mirror of
https://github.com/processing/processing4.git
synced 2026-06-16 04:26:26 +02:00
add ip() method to Server (issue 1228)
This commit is contained in:
@@ -147,6 +147,19 @@ public class Server implements Runnable {
|
||||
return -1;
|
||||
}
|
||||
|
||||
|
||||
static public String ip() {
|
||||
try {
|
||||
return InetAddress.getLocalHost().getHostAddress();
|
||||
} catch (UnknownHostException e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
return null;
|
||||
// InetAddress thisIp = InetAddress.getLocalHost();
|
||||
// thisIpAddress = thisIp.getHostAddress()
|
||||
// return server.getInetAddress().getHostAddress();
|
||||
}
|
||||
|
||||
|
||||
// the last index used for available. can't just cycle through
|
||||
// the clients in order from 0 each time, because if client 0 won't
|
||||
|
||||
Reference in New Issue
Block a user