| Server IP : 162.214.74.102 / Your IP : 216.73.216.252 Web Server : Apache System : Linux dedi-4363141.lrsys.com.br 3.10.0-1160.119.1.el7.tuxcare.els25.x86_64 #1 SMP Wed Oct 1 17:37:27 UTC 2025 x86_64 User : lrsys ( 1015) PHP Version : 5.6.40 Disable Function : exec,passthru,shell_exec,system MySQL : ON | cURL : ON | WGET : ON | Perl : ON | Python : ON | Sudo : ON | Pkexec : ON Directory : /opt/cpanel/ea-wappspector/vendor/rector/rector/vendor/react/socket/src/ |
Upload File : |
<?php
namespace RectorPrefix202411\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()
* );
*
* // 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);
}
}