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

Return full remote address instead of only IP #65

Merged
merged 1 commit into from
Jan 27, 2017

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