Examples of peerID()


Examples of net.tomp2p.peers.PeerAddress.peerId()

            System.out.println("closest so far: " + queried.first());
            PeerAddress next = pa1.pollFirst();
            while (queried.contains(next)) {
                next = pa1.pollFirst();
            }
            result = next.peerId();
            start = findNr(next.peerId().toString(), peers);
        }
    }

    public static void findInMap(PeerAddress key, Peer[] peers) {
View Full Code Here

Examples of net.tomp2p.peers.PeerAddress.peerId()

            PeerAddress next = pa1.pollFirst();
            while (queried.contains(next)) {
                next = pa1.pollFirst();
            }
            result = next.peerId();
            start = findNr(next.peerId().toString(), peers);
        }
    }

    public static void findInMap(PeerAddress key, Peer[] peers) {
        for (int i = 0; i < peers.length; i++) {
View Full Code Here

Examples of net.tomp2p.peers.PeerAddress.peerId()

            System.out.println("closest so far: " + queried.first());
            PeerAddress next = pa1.pollFirst();
            while (queried.contains(next)) {
                next = pa1.pollFirst();
            }
            result = next.peerId();
            start = findNr(next.peerId().toString(), peers);
        }
    }

    public static void findInMap(PeerAddress key, Peer[] peers) {
View Full Code Here

Examples of net.tomp2p.peers.PeerAddress.peerId()

            PeerAddress next = pa1.pollFirst();
            while (queried.contains(next)) {
                next = pa1.pollFirst();
            }
            result = next.peerId();
            start = findNr(next.peerId().toString(), peers);
        }
    }

    public static void findInMap(PeerAddress key, Peer[] peers) {
        for (int i = 0; i < peers.length; i++) {
View Full Code Here

Examples of net.tomp2p.peers.PeerAddress.peerId()

    PeerAddress recipient = message.recipient();

    // Search for handler, 0 is ping. If we send with peerid = ZERO, then we
    // take the first one we found
    if (recipient.peerId().isZero() && message.command() == RPC.Commands.PING.getNr()) {
      Number160 peerId = peerBeanMaster.serverPeerAddress().peerId();
      return searchHandler(peerId, peerId, RPC.Commands.PING.getNr());
      // else we search for the handler that we are responsible for
    } else {
      DispatchHandler handler = searchHandler(recipient.peerId(), recipient.peerId(), message.command());
View Full Code Here

Examples of net.tomp2p.peers.PeerAddress.peerId()

    if (recipient.peerId().isZero() && message.command() == RPC.Commands.PING.getNr()) {
      Number160 peerId = peerBeanMaster.serverPeerAddress().peerId();
      return searchHandler(peerId, peerId, RPC.Commands.PING.getNr());
      // else we search for the handler that we are responsible for
    } else {
      DispatchHandler handler = searchHandler(recipient.peerId(), recipient.peerId(), message.command());
      if (handler != null) {
        return handler;
      }

      // if we could not find a handler that we are responsible for, we
View Full Code Here

Examples of net.tomp2p.peers.PeerAddress.peerId()

    if (recipient.peerId().isZero() && message.command() == RPC.Commands.PING.getNr()) {
      Number160 peerId = peerBeanMaster.serverPeerAddress().peerId();
      return searchHandler(peerId, peerId, RPC.Commands.PING.getNr());
      // else we search for the handler that we are responsible for
    } else {
      DispatchHandler handler = searchHandler(recipient.peerId(), recipient.peerId(), message.command());
      if (handler != null) {
        return handler;
      }

      // if we could not find a handler that we are responsible for, we
View Full Code Here

Examples of net.tomp2p.peers.PeerAddress.peerId()

      // if we could not find a handler that we are responsible for, we
      // are most likely a relay. Since we have no id of the relay, we
      // just take the first one.
      Map<Number320, DispatchHandler> map = searchHandler(Integer.valueOf(message.command()));
      for (Map.Entry<Number320, DispatchHandler> entry : map.entrySet()) {
        if (entry.getKey().domainKey().equals(recipient.peerId())) {
          return entry.getValue();
        }
      }
      return null;
    }
View Full Code Here

Examples of net.tomp2p.peers.PeerAddress.peerId()

                if (next != null) {
                    routingMechanism.addToAlreadyAsked(next);
                    active++;
                    // if we search for a random peer, then the peer should
                    // return the address farest away.
                    final Number160 locationKey2 = randomSearch ? next.peerId().xor(Number160.MAX_VALUE)
                            : routingBuilder.locationKey();
                    routingBuilder.locationKey(locationKey2);
                    
                    if(LOG.isWarnEnabled() ) {
                      //routing is per default UDP, don't show warning if the other TCP/UDP is used
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.