MCPcopy Create free account
hub / github.com/OpenEndedGroup/Field2 / nextAvailable

Method nextAvailable

src/main/java/field/utility/Ports.java:8–15  ·  view source on GitHub ↗
(int from)

Source from the content-addressed store, hash-verified

6public class Ports {
7
8 static public int nextAvailable(int from)
9 {
10 for(int i=from;i<Integer.MAX_VALUE;i++)
11 {
12 if (available(i)) return i;
13 }
14 throw new RuntimeException();
15 }
16
17 static public boolean available(int port) {
18 Socket s = null;

Callers 4

ServerSupportMethod · 0.95
loadedMethod · 0.95
LittleServerClass · 0.80
HTMLToTextureClass · 0.80

Calls 1

availableMethod · 0.95

Tested by

no test coverage detected