404

[ Avaa Bypassed ]




Upload:

Command:

botdev@18.223.3.50: ~ $
<?php

namespace React\Socket;

use Evenement\EventEmitter;
use React\EventLoop\LoopInterface;
use Exception;

final class Server extends EventEmitter implements ServerInterface
{
    private $server;

    public function __construct($uri, LoopInterface $loop, array $context = array())
    {
        // sanitize TCP context options if not properly wrapped
        if ($context && (!isset($context['tcp']) && !isset($context['tls']) && !isset($context['unix']))) {
            $context = array('tcp' => $context);
        }

        // apply default options if not explicitly given
        $context += array(
            'tcp' => array(),
            'tls' => array(),
            'unix' => array()
        );

        $scheme = 'tcp';
        $pos = \strpos($uri, '://');
        if ($pos !== false) {
            $scheme = \substr($uri, 0, $pos);
        }

        if ($scheme === 'unix') {
            $server = new UnixServer($uri, $loop, $context['unix']);
        } else {
            $server = new TcpServer(str_replace('tls://', '', $uri), $loop, $context['tcp']);

            if ($scheme === 'tls') {
                $server = new SecureServer($server, $loop, $context['tls']);
            }
        }

        $this->server = $server;

        $that = $this;
        $server->on('connection', function (ConnectionInterface $conn) use ($that) {
            $that->emit('connection', array($conn));
        });
        $server->on('error', function (Exception $error) use ($that) {
            $that->emit('error', array($error));
        });
    }

    public function getAddress()
    {
        return $this->server->getAddress();
    }

    public function pause()
    {
        $this->server->pause();
    }

    public function resume()
    {
        $this->server->resume();
    }

    public function close()
    {
        $this->server->close();
    }
}

Filemanager

Name Type Size Permission Actions
Connection.php File 5.42 KB 0644
ConnectionInterface.php File 4.32 KB 0644
Connector.php File 4.21 KB 0644
ConnectorInterface.php File 2.02 KB 0644
DnsConnector.php File 4.42 KB 0644
FixedUriConnector.php File 1.05 KB 0644
LimitingServer.php File 6.47 KB 0644
SecureConnector.php File 2.99 KB 0644
SecureServer.php File 6.91 KB 0644
Server.php File 1.83 KB 0644
ServerInterface.php File 5.15 KB 0644
StreamEncryption.php File 4.91 KB 0644
TcpConnector.php File 4.27 KB 0644
TcpServer.php File 7.55 KB 0644
TimeoutConnector.php File 1.45 KB 0644
UnixConnector.php File 1.12 KB 0644
UnixServer.php File 4.15 KB 0644