Changeset 018098b


Ignore:
Timestamp:
Jul 18, 2013 1:52:46 AM (7 years ago)
Author:
zab2 <zab2@…>
Branches:
master
Children:
ae347c4
Parents:
1e2fb4b
Message:

better loading from cache

Location:
apps/streaming/java/src/net/i2p/client/streaming
Files:
2 edited

Legend:

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

    r1e2fb4b r018098b  
    573573    /** used in TCB @since 0.9.8 */
    574574    int getRTTDev() { return _rttDev; }
    575     /** used in TCB @since 0.9.8 */
    576     void setRTTDev(int rttDev) { _rttDev = rttDev; }
     575    private void setRTTDev(int rttDev) { _rttDev = rttDev; }
    577576   
    578577    /**
    579      * mark these options as loaded from cache.
    580      * affects the calculation of RTO
    581      */
    582     synchronized void loadedFromCache() {
     578     * Loads options from TCB cache.
     579     */
     580    synchronized void loadFromCache(int rtt, int rttDev, int wdw) {
    583581        _initState = AckInit.STEADY;
     582        setRTT(rtt);
     583        setRTTDev(rttDev);
     584        setWindowSize(wdw);
     585        computeRTO();
    584586    }
    585587   
     
    587589     * computes RTO based on formula in RFC
    588590     */
    589     synchronized void computeRTO() {
     591    private synchronized void computeRTO() {
    590592        switch(_initState) {
    591593        case INIT :
  • apps/streaming/java/src/net/i2p/client/streaming/TCBShare.java

    r1e2fb4b r018098b  
    100100                       " wdw: " + wdw );
    101101        }
    102         opts.loadedFromCache();
    103         opts.setRTT(rtt);
    104         opts.setRTTDev(rttDev);
    105         opts.setWindowSize(wdw);
    106         opts.computeRTO();
     102        opts.loadFromCache(rtt,rttDev,wdw);
    107103    }
    108104
Note: See TracChangeset for help on using the changeset viewer.