Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[SocketClent] Connector::create() should return a Connection instance and provide getRemoteAddress() #188

Closed
clue opened this issue Apr 23, 2013 · 2 comments
Labels
Milestone

Comments

@clue
Copy link
Member

clue commented Apr 23, 2013

Connector::create() currently creates a Stream instance with no access to the remote address. When connecting to hostnames instead of IP addresses the target remote address is particularly useful.

Instead, it should return a React\Stream\Connection instance with implements the ConnectionInterface in order to provide a getRemoteAddress() method.

While this change is quite simple, it has a couple of drawbacks:

  • Is it accepted practice to create additional dependencies between react's sub-packages?
  • Connection currently uses stream_socket_recvfrom() which bypasses stream wrappers (in particular SSL streams won't be decrypted anymore). Maybe this should be handled in a separate ticket anyway? (Also considering Alternate Scheme Support for Client bergie/dnode-php#24 here...)
@igorw
Copy link
Contributor

igorw commented Jul 10, 2013

We want to merge SocketClient with Socket and have either Socket\Client\Connection or a common Socket\Connection.

@cboden cboden added the stream label Feb 17, 2014
@clue
Copy link
Member Author

clue commented Feb 8, 2017

We want to merge SocketClient with Socket and have either Socket\Client\Connection or a common Socket\Connection.

See #215

[…] it should return a React\Stream\Connection instance with implements the ConnectionInterface in order to provide a getRemoteAddress() method.

See reactphp-legacy/socket-client#44

@clue clue closed this as completed Feb 8, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants