clue · GitHub

The FixedUriConnector class implements the
ConnectorInterface and 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:

$connector = new FixedUriConnector(
    'unix:///var/run/docker.sock',
    new UnixConnector($loop)
);
// destination will be ignored, actually connects to Unix domain socket
$promise = $connector->connect('localhost:80');

Required to bring Unix domain socket (UDS) path support to our HttpClient (reactphp/http-client#46)

Read the original on github.com ↗