clue · GitHub

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:

Read the original on github.com ↗