X-Git-Url: https://git.pterodactylus.net/?a=blobdiff_plain;f=src%2Fmain%2Fjava%2Fnet%2Fpterodactylus%2Fxdcc%2Fui%2Fstdin%2FNetworkAdapter.java;h=a45a341d1f14867f268de3c41ab1e94650b8f2e1;hb=5473b841a09efe46cfbaf70d3c62526e224386f8;hp=cff376a3d3887c8764386d2f60c583f2ef727dc4;hpb=4b2e7897d86ad621f258c5699957e6bc7fda462a;p=xudocci.git diff --git a/src/main/java/net/pterodactylus/xdcc/ui/stdin/NetworkAdapter.java b/src/main/java/net/pterodactylus/xdcc/ui/stdin/NetworkAdapter.java index cff376a..a45a341 100644 --- a/src/main/java/net/pterodactylus/xdcc/ui/stdin/NetworkAdapter.java +++ b/src/main/java/net/pterodactylus/xdcc/ui/stdin/NetworkAdapter.java @@ -44,6 +44,7 @@ public class NetworkAdapter extends AbstractExecutionThreadService { /** The core being controlled. */ private final Core core; + private final int port; /** * Creates a new network acceptor. @@ -51,14 +52,15 @@ public class NetworkAdapter extends AbstractExecutionThreadService { * @param eventBus * @param core */ - public NetworkAdapter(EventBus eventBus, Core core) { + public NetworkAdapter(EventBus eventBus, Core core, int port) { this.eventBus = eventBus; this.core = core; + this.port = port; } @Override protected void run() throws Exception { - ServerSocket serverSocket = new ServerSocket(45678); + ServerSocket serverSocket = new ServerSocket(port); serverSocket.setSoTimeout((int) TimeUnit.SECONDS.toMillis(1)); while (isRunning()) { try {