404

[ Avaa Bypassed ]




Upload:

Command:

botdev@3.145.201.49: ~ $
<?php
namespace Ratchet\Client;
use React\EventLoop\LoopInterface;
use React\EventLoop\Factory as ReactFactory;
use React\EventLoop\Timer\Timer;

/**
 * @param string             $url
 * @param array              $subProtocols
 * @param array              $headers
 * @param LoopInterface|null $loop
 * @return \React\Promise\PromiseInterface<\Ratchet\Client\WebSocket>
 */
function connect($url, array $subProtocols = [], $headers = [], LoopInterface $loop = null) {
    $loop = $loop ?: ReactFactory::create();

    $connector = new Connector($loop);
    $connection = $connector($url, $subProtocols, $headers);

    $runHasBeenCalled = false;

    $loop->addTimer(Timer::MIN_INTERVAL, function () use (&$runHasBeenCalled) {
        $runHasBeenCalled = true;
    });

    register_shutdown_function(function() use ($loop, &$runHasBeenCalled) {
        if (!$runHasBeenCalled) {
            $loop->run();
        }
    });

    return $connection;
}

Filemanager

Name Type Size Permission Actions
Connector.php File 4.9 KB 0644
WebSocket.php File 4.42 KB 0755
functions.php File 951 B 0644
functions_include.php File 98 B 0644