Skip to content

Add FixedUriConnector decorator to use fixed, preconfigured URI instead - #117

Merged
WyriHaximus merged 1 commit into
reactphp:masterfrom
clue-labs:fixed-uri
Sep 16, 2017
Merged

Add FixedUriConnector decorator to use fixed, preconfigured URI instead#117
WyriHaximus merged 1 commit into
reactphp:masterfrom
clue-labs:fixed-uri

Conversation

@clue

@clueclue commented Sep 15, 2017

Copy link
Copy Markdown
Member

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 = newFixedUriConnector(
'unix:///var/run/docker.sock',
newUnixConnector($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)

Supersedes reactphp-legacy/socket-client#42

@WyriHaximusWyriHaximus left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

:shipit:

Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants

@clue@jsor@WyriHaximus