404

[ Avaa Bypassed ]




Upload:

Command:

botdev@18.219.47.115: ~ $
<?php

namespace React\Socket;

/**
 * Decorates an existing Connector to always use a fixed, preconfigured URI
 *
 * This can be useful for consumers that do not support certain URIs, such as
 * when you want to explicitly connect to a Unix domain socket (UDS) path
 * instead of connecting to a default address assumed by an higher-level API:
 *
 * ```php
 * $connector = new React\Socket\FixedUriConnector(
 *     'unix:///var/run/docker.sock',
 *     new React\Socket\UnixConnector($loop)
 * );
 *
 * // destination will be ignored, actually connects to Unix domain socket
 * $promise = $connector->connect('localhost:80');
 * ```
 */
class FixedUriConnector implements ConnectorInterface
{
    private $uri;
    private $connector;

    /**
     * @param string $uri
     * @param ConnectorInterface $connector
     */
    public function __construct($uri, ConnectorInterface $connector)
    {
        $this->uri = $uri;
        $this->connector = $connector;
    }

    public function connect($_)
    {
        return $this->connector->connect($this->uri);
    }
}

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