Examples of RateHandler


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

    connections_mon = new AEMonitor( "TransferProcessor:" +processor_type );

    main_bucket = createBucket( max_rate.getRateLimitBytesPerSecond() );

    main_rate_handler =
      new RateHandler() {
        public int getCurrentNumBytesAllowed() {
          if( main_bucket.getRate() != max_rate.getRateLimitBytesPerSecond() ) { //sync rate
            main_bucket.setRate( max_rate.getRateLimitBytesPerSecond() );
          }
          return main_bucket.getAvailableByteCount();
View Full Code Here

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

    finally{ connections_mon.exit(); }
   
    if( connection_data != null && connection_data.state == ConnectionData.STATE_NORMAL ) {
      final ConnectionData conn_data = connection_data;
     
      main_controller.upgradePeerConnection( connection, new RateHandler() {
        public int getCurrentNumBytesAllowed() {         
          // sync global rate
          if( main_bucket.getRate() != max_rate.getRateLimitBytesPerSecond() ) {
            main_bucket.setRate( max_rate.getRateLimitBytesPerSecond() );
          }
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.