Skip to content

Instantly share code, notes, and snippets.

@ldaley
Created May 17, 2013 09:25
Show Gist options
  • Save ldaley/5597993 to your computer and use it in GitHub Desktop.
Save ldaley/5597993 to your computer and use it in GitHub Desktop.
public String getBindHost() {
if (boundAddress == null) {
return null;
} else {
InetAddress address = boundAddress.getAddress();
if (address.isAnyLocalAddress()) {
return "localhost";
} else {
return address.getHostAddress();
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment