diff --git a/documentation/connections.html b/documentation/connections.html index 081e70f1a..36fa17f2c 100644 --- a/documentation/connections.html +++ b/documentation/connections.html @@ -20,8 +20,8 @@
The org.jivesoftware.smack.XMPPConnection class manages your connection to an XMPP - server. The default implementation is the org.jivesoftware.smack.XMPPConnection - class. Two constructors are mainly used. The first, XMPPConnection(String) takes + server. The default implementation is the org.jivesoftware.smack.XMPPTCPConnection + class. Two constructors are mainly used. The first, XMPPTCPConnection(String) takes the server name you'd like to connect to as an argument. All default connection settings will be used:
// Create a connection to the jabber.org server. -Connection conn1 = new XMPPConnection("jabber.org"); +XMPPConnection conn1 = new XMPPTCPConnection("jabber.org"); conn1.connect(); // Create a connection to the jabber.org server on a specific port. ConnectionConfiguration config = new ConnectionConfiguration("jabber.org", 5222); -Connection conn2 = new XMPPConnection(config); +XMPPConnection conn2 = new XMPPTCPConnection(config); conn2.connect();
-Connection connection = new XMPPConnection("jabber.org"); +XMPPConnection connection = new XMPPTCPConnection("jabber.org"); connection.connect(); connection.login("mtucker", "password"); Chat chat = connection.getChatManager().createChat("jsmith@jivesoftware.com", new MessageListener() {