Changeset 8937c4b for apps/ministreaming


Ignore:
Timestamp:
Jul 17, 2013 6:13:42 PM (7 years ago)
Author:
zab2 <zab2@…>
Branches:
master
Children:
171f0d2
Parents:
2902a708
Message:

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

File:
1 edited

Legend:

Unmodified
Added
Removed
  • apps/ministreaming/java/src/net/i2p/client/streaming/I2PSocketOptionsImpl.java

    r2902a708 r8937c4b  
    9494    }
    9595   
     96    protected static double getDouble(Properties opts, String name, double defaultVal) {
     97        if (opts == null) return defaultVal;
     98        String val = opts.getProperty(name);
     99        if (val == null) {
     100            return defaultVal;
     101        } else {
     102            try {
     103                return Double.parseDouble(val);
     104            } catch (NumberFormatException nfe) {
     105                return defaultVal;
     106            }
     107        }
     108    }
     109   
    96110    /**
    97111     * How long we will wait for the ACK from a SYN, in milliseconds.
Note: See TracChangeset for help on using the changeset viewer.