Store stdev of rtt in the TCB cache as per RFC 2140

This commit is contained in:
zab2
2013-07-17 18:13:42 +00:00
parent 2902a708f9
commit 8937c4bf2a
3 changed files with 75 additions and 11 deletions

View File

@@ -93,6 +93,20 @@ class I2PSocketOptionsImpl implements I2PSocketOptions {
}
}
protected static double getDouble(Properties opts, String name, double defaultVal) {
if (opts == null) return defaultVal;
String val = opts.getProperty(name);
if (val == null) {
return defaultVal;
} else {
try {
return Double.parseDouble(val);
} catch (NumberFormatException nfe) {
return defaultVal;
}
}
}
/**
* How long we will wait for the ACK from a SYN, in milliseconds.
*