Package com.aelitis.azureus.core.networkmanager

Examples of com.aelitis.azureus.core.networkmanager.NetworkConnection


    final HTTPNetworkConnection    old_http_connection,
    final byte[]          old_hash,
    final byte[]          new_hash,
    final String          header )
  {
    final NetworkConnection  old_connection = old_http_connection.getConnection();
   
    PeerManagerRegistration reg_data =
      PeerManager.getSingleton().manualMatchHash(
          old_connection.getEndpoint().getNotionalAddress(),
          new_hash );

    if ( reg_data == null ){
     
      old_http_connection.close( "Re-routing failed - registration not found" );
     
      return;
    }
 
    final Transport transport = old_connection.detachTransport();
   
    old_http_connection.close( "Switching torrents" );
   
    final NetworkConnection new_connection =
      NetworkManager.getSingleton().bindTransport(
          transport,
          new HTTPMessageEncoder(),
          new HTTPMessageDecoder( header ));
   
View Full Code Here


   
    ConnectionEndpoint connection_endpoint  = new ConnectionEndpoint( address );

    connection_endpoint.addProtocol( pe );

    final NetworkConnection connection =
      NetworkManager.getSingleton().createConnection(
          connection_endpoint,
          new BTMessageEncoder(),
          new BTMessageDecoder(),
          use_crypto,
View Full Code Here

TOP

Related Classes of com.aelitis.azureus.core.networkmanager.NetworkConnection

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.