CasperSecurity

Current Path : /var/www/hrms.uiet.co.in/node_modules/pusher-js/src/core/strategies/
Upload File :
Current File : /var/www/hrms.uiet.co.in/node_modules/pusher-js/src/core/strategies/first_connected_strategy.ts

import Strategy from './strategy';
import StrategyRunner from './strategy_runner';

/** Launches the substrategy and terminates on the first open connection.
 *
 * @param {Strategy} strategy
 */
export default class FirstConnectedStrategy implements Strategy {
  strategy: Strategy;

  constructor(strategy: Strategy) {
    this.strategy = strategy;
  }

  isSupported(): boolean {
    return this.strategy.isSupported();
  }

  connect(minPriority: number, callback: Function): StrategyRunner {
    var runner = this.strategy.connect(minPriority, function(error, handshake) {
      if (handshake) {
        runner.abort();
      }
      callback(error, handshake);
    });
    return runner;
  }
}
Hacker Blog, Shell İndir, Sql İnjection, XSS Attacks, LFI Attacks, Social Hacking, Exploit Bot, Proxy Tools, Web Shell, PHP Shell, Alfa Shell İndir, Hacking Training Set, DDoS Script, Denial Of Service, Botnet, RFI Attacks, Encryption
Telegram @BIBIL_0DAY