Basically, make the channels public and just let the client handle a
stream/net error if it's interested.
This simplifies the API a little and also allows an application to
select {} from the XMPP channel and any other channels at the same time.
The filter mechanism allows you to route any matching stanza to a custom
channel. The SendRecv(iq) method uses a once-only filter to watch for
a reply.
The address of the server is not necessarily related to the JID, e.g.
DNS SRV lookups, manual configuration, etc. Splitting them up means
there's more control and flexibility over how things are put together.
We can always add convenience funcs later, e.g. something like
DialClient(jid, password), to handle the common case.
Client connections negotiate a bound resource JID with the server. The
bound JID may be different from the one requested or even generated by
the server.
Component connections do not negotiate the bound JID but still have a
specific JID associated with the stream.