mirror of
https://github.com/vanitasvitae/Smack.git
synced 2024-12-22 18:48:00 +01:00
[core] Add ConnectionConfiguration.getHostString()
This commit is contained in:
parent
9b6e209b5f
commit
00bcbff5ee
1 changed files with 10 additions and 0 deletions
|
@ -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…
Reference in a new issue