Examples of peerFound()


Examples of net.tomp2p.peers.PeerMap.peerFound()

      PeerMap peerMap = new PeerMap(conf);

      Statistics statistics = new Statistics(peerMap);
      for (int i = 0; i < nr; i++) {
        PeerAddress pa = Utils2.createAddress(new Number160(rnd));
        peerMap.peerFound(pa, null, null);
      }

      double diff = nr / statistics.estimatedNumberOfNodes();
      System.err.println("diff: " + diff);
      System.err.println("estimated: " + statistics.estimatedNumberOfNodes() + " actual: " + (nr-1));
View Full Code Here

Examples of net.tomp2p.peers.PeerMap.peerFound()

  public static List<Map<Number160, PeerStatistic>> unflatten(Collection<PeerAddress> map, PeerAddress sender) {
    PeerMapConfiguration peerMapConfiguration = new PeerMapConfiguration(sender.peerId());
    PeerMap peerMap = new PeerMap(peerMapConfiguration);
    for (PeerAddress peerAddress : map) {
      peerMap.peerFound(peerAddress, null, null);
    }
    return peerMap.peerMapVerified();
  }

  public static Collection<PeerAddress> flatten(List<Map<Number160, PeerStatistic>> maps) {
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.