Commit 51067ddc authored by akwizgran's avatar akwizgran

Define a preferred port.

parent 9f98bfe3
......@@ -15,6 +15,7 @@ import static java.util.logging.Logger.getLogger;
public class Server {
private static final int PREFERRED_PORT = 40404;
private static final byte CONNECTION_TYPE_UPLOAD = 0;
private static final byte CONNECTION_TYPE_DOWNLOAD = 1;
private static final int BUFFER_SIZE = 4096;
......@@ -28,7 +29,7 @@ public class Server {
}
private void run() throws IOException {
ServerSocket ss = new ServerSocket(0);
ServerSocket ss = new ServerSocket(PREFERRED_PORT);
LOG.info("Listening on port " + ss.getLocalPort());
//noinspection InfiniteLoopStatement
while (true) {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment