Package com.aelitis.azureus.core.peermanager.peerdb

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


  {
    if ( seeding != s ){

      seeding  = s;

        PeerExchangerItem pex_item = peer_exchange_item;

      if ( pex_item != null && s){

        pex_item.seedStatusChanged();
      }
    }
  }
View Full Code Here


   */
  private void doPostHandshakeProcessing() {
    //peer exchange registration
    if( manager.isPeerExchangeEnabled()) {
      //try and register all connections for their peer exchange info
        PeerExchangerItem pex_item = peer_exchange_item;

      if(pex_item == null && canBePeerExchanged()){
        pex_item = peer_exchange_item = manager.createPeerExchangeConnection( this );
      }
     
      if( pex_item != null ) {
        //check for peer exchange support
        if(ut_pex_enabled || peerSupportsMessageType(AZMessage.ID_AZ_PEER_EXCHANGE)) {
          peer_exchange_supported = true;
         
          pex_item.enableStateMaintenance();
        }
        else //no need to maintain internal states as we wont be sending/receiving peer exchange messages
          pex_item.disableStateMaintenance();
        }
      }
    }

    request_hint_supported   = peerSupportsMessageType( AZMessage.ID_AZ_REQUEST_HINT );
View Full Code Here


  public void updatePeerExchange() {
    if ( current_peer_state != TRANSFERING ) return;
    if( !peer_exchange_supported return;
      PeerExchangerItem pex_item = peer_exchange_item;

    if( pex_item != null && manager.isPeerExchangeEnabled()) {
      final PeerItem[] adds = pex_item.getNewlyAddedPeerConnections();
      final PeerItem[] drops = pex_item.getNewlyDroppedPeerConnections()

      if( (adds != null && adds.length > 0) || (drops != null && drops.length > 0) ) {
        if (ut_pex_enabled) {
          connection.getOutgoingMessageQueue().addMessage( new UTPeerExchange(adds, drops, null, (byte)0), false);
        }
View Full Code Here

        dropped  = null;
    }
   
      has_received_initial_pex = true;

      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 );
        }
      }

      if( dropped != null ) {
        for( int i=0; i < dropped.length; i++ ) {
          pex_item.dropConnectedPeer( dropped[i] );
        }
      }
    }
    else {
      if (Logger.isEnabled())
View Full Code Here

TOP

Related Classes of com.aelitis.azureus.core.peermanager.peerdb.PeerExchangerItem

Copyright © 2018 www.massapicom. 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.