difference between XMPP servername and XMPP servicename?

Jus12 picture Jus12 · Mar 4, 2011 · Viewed 11.3k times · Source

In Smack API, there is a configuration class for connection, described at this page

ConnectionConfiguration

I am confused about the distinction between service name and server name.

Suppose I have a computer named "mybox.mydomain.com", and I have ejabberd on it with a configured host called "myhost" (using the line {hosts, ["myhost"]}. in ejabbed.cfg),

what is the host name, server name and service name in this case?

Answer

Eric picture Eric · Mar 4, 2011
  • myhost: service name (or XMPP domain)
  • mybox.mydomain.com: hostname and servername.

You can host an XMPP domain over any host, provided that you set the SRV records right in the DNS or if the client specifies to which host it is supposed to connect (like email).