![]() Server : Apache System : Linux server2.corals.io 4.18.0-348.2.1.el8_5.x86_64 #1 SMP Mon Nov 15 09:17:08 EST 2021 x86_64 User : corals ( 1002) PHP Version : 7.4.33 Disable Function : exec,passthru,shell_exec,system Directory : /home/corals/cartforge.co/vendor/rector/rector/vendor/react/socket/src/ |
<?php namespace RectorPrefix202410\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); } }