Changeset 4d4bfa0


Ignore:
Timestamp:
Jan 1, 2011 2:59:41 PM (9 years ago)
Author:
zzz <zzz@…>
Branches:
master
Children:
8d59fd1
Parents:
ffcff54
Message:

add dht stub

Location:
apps/i2psnark/java/src/org/klomp/snark
Files:
1 added
3 edited

Legend:

Unmodified
Added
Removed
  • apps/i2psnark/java/src/org/klomp/snark/I2PSnarkUtil.java

    rffcff54 r4d4bfa0  
    3535import net.i2p.util.Translate;
    3636
     37import org.klomp.snark.dht.DHT;
    3738import org.klomp.snark.dht.KRPC;
    3839
     
    6263    private int _startupDelay;
    6364    private boolean _shouldUseOT;
    64     private KRPC _krpc;
     65    private DHT _dht;
    6566
    6667    public static final int DEFAULT_STARTUP_DELAY = 3;
     
    196197        }
    197198        // FIXME this only instantiates krpc once, left stuck with old manager
    198         if (ENABLE_DHT && _manager != null && _krpc == null)
    199             _krpc = new KRPC(_context, _manager.getSession());
     199        if (ENABLE_DHT && _manager != null && _dht == null)
     200            _dht = new KRPC(_context, _manager.getSession());
    200201        return (_manager != null);
    201202    }
     
    205206     * @since 0.8.4
    206207     */
    207     public KRPC getDHT() { return _krpc; }
     208    public DHT getDHT() { return _dht; }
    208209
    209210    public boolean connected() { return _manager != null; }
  • apps/i2psnark/java/src/org/klomp/snark/PeerCoordinator.java

    rffcff54 r4d4bfa0  
    3737import net.i2p.util.SimpleTimer2;
    3838
    39 import org.klomp.snark.dht.KRPC;
     39import org.klomp.snark.dht.DHT;
    4040
    4141/**
     
    11951195   */
    11961196  public void gotPort(Peer peer, int port) {
    1197       KRPC krpc = _util.getDHT();
    1198       if (krpc != null)
    1199           krpc.ping(peer.getDestination(), port);
     1197      DHT dht = _util.getDHT();
     1198      if (dht != null)
     1199          dht.ping(peer.getDestination(), port);
    12001200  }
    12011201
  • apps/i2psnark/java/src/org/klomp/snark/TrackerClient.java

    rffcff54 r4d4bfa0  
    3939import net.i2p.util.Log;
    4040
    41 import org.klomp.snark.dht.KRPC;
     41import org.klomp.snark.dht.DHT;
    4242
    4343/**
Note: See TracChangeset for help on using the changeset viewer.