Connect method will initiate connection between wodXMPP
and the remote server. It can be used only if wodXMPP is
not connected with server at the same moment (in other
words, if State
is set to Disconnected).
If you do not provide Hostname argument, wodXMPP will read it
from the JID (in Login
property), and send DNS SRV request to your server to determine
where is XMPP service located. This will, for example, allow your
gmail.com accounts to work with no
extra changes.
If connection succeeds, Connected event
will be fired and you can start to exchange messages with
your contacts. If connection fails, Disconnected
event will be fired.