-
Notifications
You must be signed in to change notification settings - Fork 16
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
Missing information about changes in SoketAddress for getting hostname and IP #70
Comments
thanks |
it seems according to the implementation that previously |
We experienced the change when trying to get remote IP address of http connection: |
that's odd, I just checked the vertx 3 behavior and I don't understand how that is possible, can you provide a reproducer ? |
Sure. Here is a reproducer. vertx version 4.2.7: public class HostAddressVertx4 { public static void main(String[] args) {
} vertx version 3.9.5 public class HostAddressVertx3 { public static void main(String[] args) {
} Outputs:
|
https://vertx.io/docs/apidocs/io/vertx/core/net/SocketAddress.html host() - Returns the host name when available or the IP address in string representation. |
SoketAddress.host() used to return IP address. Now after the migration it returns host name. From SoketAddress docs it seems that host() method changed its meaning, and I should use hostAddress if I want the IP. This is not documneted in migration guide, and it is very confusing and easy to overlook in the migration.
The text was updated successfully, but these errors were encountered: