Skip to content

Conversation

@clue
Copy link
Member

@clue clue commented Jan 26, 2017

The getRemoteAddress() currently only returns the IP part and explicitly omits the port. This has been documented as of v0.4.4 and has in fact been like this ever since this method has been added.

This PR changes this so that it returns the full remote address, i.e. IP and port.

echo $conn->getRemoteAddress();
- 192.168.0.12
+ 192.168.0.12:41761

This is obviously a (minor?) BC break, so I've made sure to add documentation on how to get only the IP from the full address with a one-liner.

There are plenty of reasons, let me try to list a few here:

Copy link
Member

@WyriHaximus WyriHaximus left a comment

Choose a reason for hiding this comment

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

:shipit:

Sign up for free to 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.

Also expose port for each connection

3 participants