[core] Add ConnectionConfiguration.getHostString()

master
Florian Schmaus 3 months ago
parent 9b6e209b5f
commit 00bcbff5ee
  1. 10
      smack-core/src/main/java/org/jivesoftware/smack/ConnectionConfiguration.java

@ -302,6 +302,16 @@ public abstract class ConnectionConfiguration {
return new SmackTlsContext(context, daneVerifier);
}
public String getHostString() {
if (hostAddress != null) {
return hostAddress.toString();
}
if (host != null) {
return host.toString();
}
return xmppServiceDomain.toString();
}
public DnsName getHost() {
return host;
}

Loading…
Cancel
Save