Examples of PeerItem


Examples of com.aelitis.azureus.core.peermanager.peerdb.PeerItem

      PeerExchangerItem pex_item = peer_exchange_item;
   
    if( peer_exchange_supported && pex_item != null && manager.isPeerExchangeEnabled()){
      if( added != null ) {
        for( int i=0; i < added.length; i++ ) {
          PeerItem pi = added[i];
          manager.peerDiscovered( this, pi );
          pex_item.addConnectedPeer( pi );
        }
      }
View Full Code Here

Examples of com.aelitis.azureus.core.peermanager.peerdb.PeerItem

      if (peers.isEmpty()) {return;}
     
      byte[] raw_peers = new byte[peers.size() * peer_byte_size];
      byte[] peer_flags = (include_flags) ? new byte[peers.size()] : null;
       
      PeerItem peer;
        for (int i=0; i<peers.size(); i++ ) {
          peer = (PeerItem)peers.get(i);
          byte[] serialised_peer = peer.getSerialization();
          if (serialised_peer.length != peer_byte_size) {System.out.println("> " + serialised_peer.length + ":" + peer_byte_size);}
          System.arraycopy(serialised_peer, 0, raw_peers, i * peer_byte_size, peer_byte_size);
          if (peer_flags != null && NetworkManager.getCryptoRequired(peer.getCryptoLevel())) {
            peer_flags[i] |= 0x01; // Encrypted connection.
          }
          // 0x02 indicates if the peer is a seed, but that's difficult to determine
          // so we'll leave it.
        } // end for
View Full Code Here

Examples of com.aelitis.azureus.core.peermanager.peerdb.PeerItem

            type = PeerItemFactory.HANDSHAKE_TYPE_CRYPTO;
          if (flags != null && (flags[i] & 0x02) != 0 && noSeeds)
            continue;
         
          try {
            PeerItem peer = PeerItemFactory.createPeerItem(full_address, PeerItemFactory.PEER_SOURCE_PEER_EXCHANGE, type, 0);
            peers.add(peer);
          }
          catch (Exception e) {
            if (Logger.isEnabled())
              Logger.log(new LogEvent(LOGID, LogEvent.LT_WARNING, "PEX (UT): invalid peer received"));  
View Full Code Here

Examples of lupos.distributed.p2p.gui.P2PConfigFrame.PeerItem

      P2P_QueryClient_Instanciator.setSubgraphSubmission(withSubgraphSubmission);
     
      /*
       * ask which instance is to be used
       */
      PeerItem instance = configurationUI.showDialog();
      if (instance != null && instance.queryEvaluator != null) return instance.queryEvaluator;
      return null;
    } finally {
      P2P_QueryClient_Instanciator.unlock();
    }
View Full Code Here

Examples of lupos.distributed.p2p.gui.P2PConfigFrame.PeerItem

      P2P_QueryClient_Instanciator.setP2PImplementationConfiguration(config);
     
      /*
       * ask which instance is to be used
       */
      PeerItem instance = configurationUI.showDialog();
      if (instance != null && instance.queryEvaluator != null) return instance.queryEvaluator;
      return null;
    } finally {
      P2P_QueryClient_Instanciator.unlock();
    }
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.