1
0
Fork 0
mirror of https://github.com/vanitasvitae/Smack.git synced 2024-06-18 09:24:49 +02:00

[core] Add ConnectionConfiguration.getHostString()

This commit is contained in:
Florian Schmaus 2022-05-18 21:45:00 +02:00
parent 9b6e209b5f
commit 00bcbff5ee

View file

@ -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;
}