Skip to content
Snippets Groups Projects
Commit d6e8ffdb authored by Brutzman, Don's avatar Brutzman, Don
Browse files

better name SERVER_TIMEOUT_MSEC

parent fba4e7cd
No related branches found
No related tags found
No related merge requests found
...@@ -45,7 +45,7 @@ public class LiFiBenchmark ...@@ -45,7 +45,7 @@ public class LiFiBenchmark
public static final int DEFAULT_READ_LIMIT = 1500000 * 1024; public static final int DEFAULT_READ_LIMIT = 1500000 * 1024;
public static final boolean DEFAULT_SERVER_FLAG = false; public static final boolean DEFAULT_SERVER_FLAG = false;
public static final int DEFAULT_DISCARD_REPS = 0; public static final int DEFAULT_DISCARD_REPS = 0;
public static final int TEN_SECONDS = 30000; // ms public static final int SERVER_TIMEOUT_MSEC = 30000; // ms
private String targetIp = DEFAULT_IP; private String targetIp = DEFAULT_IP;
private int targetPort = DEFAULT_PORT; private int targetPort = DEFAULT_PORT;
...@@ -149,7 +149,7 @@ public class LiFiBenchmark ...@@ -149,7 +149,7 @@ public class LiFiBenchmark
try { try {
ssock = new ServerSocket(targetPort); ssock = new ServerSocket(targetPort);
ssock.setSoTimeout(TEN_SECONDS); ssock.setSoTimeout(SERVER_TIMEOUT_MSEC);
System.out.println("Serving from "+Inet4Address.getLocalHost().getHostAddress()); System.out.println("Serving from "+Inet4Address.getLocalHost().getHostAddress());
System.out.println("Waiting on port "+targetPort); System.out.println("Waiting on port "+targetPort);
...@@ -161,7 +161,7 @@ public class LiFiBenchmark ...@@ -161,7 +161,7 @@ public class LiFiBenchmark
catch (IOException ex) { catch (IOException ex) {
String msg = ex.getMessage(); String msg = ex.getMessage();
if (msg.contains("Accept timed out")) if (msg.contains("Accept timed out"))
System.out.println(msg + " after " + TEN_SECONDS/1000 + " seconds"); System.out.println(msg + " after " + SERVER_TIMEOUT_MSEC/1000 + " seconds");
else { else {
System.err.println("Exception waiting for connections: "+ msg); System.err.println("Exception waiting for connections: "+ msg);
System.exit(-1); System.exit(-1);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment