From d60f3d1ee67b886440380e2b5662e1b674b2b6ba Mon Sep 17 00:00:00 2001 From: Jesus Fuentes Date: Sun, 1 Apr 2018 08:43:29 -0500 Subject: [PATCH] Update/Edit documentation --- documentation/connections.md | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/documentation/connections.md b/documentation/connections.md index c205da563..66c9fa726 100644 --- a/documentation/connections.md +++ b/documentation/connections.md @@ -6,11 +6,10 @@ Smack: XMPPConnection Management Creating a Connection --------------------- -The `org.jivesoftware.smack.XMPPConnection` class manages your connection to +The `org.jivesoftware.smack.XMPPConnection` interface manages your connection to an XMPP 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: +`org.jivesoftware.smack.tcp.XMPPTCPConnection` class. The class contains three constructors. The simplest, `XMPPTCPConnection(CharSequence, String, String)` takes the username, password, and server name you'd like +to connect to as arguments. All default connection settings will be used: * A DNS SRV lookup will be performed to find the exact address and port (typically 5222) that the server resides at. * The maximum security possible will be negotiated with the server, including TLS encryption, but the connection will fall back to lower security settings if necessary. @@ -47,12 +46,11 @@ connection.disconnect(); ``` By default Smack will try to reconnect the connection in case it was abruptly -disconnected. Use _ConnectionConfiguration#setReconnectionAllowed(boolean) to -turn on/off this feature. The reconnection manager will try to immediately +disconnected. The reconnection manager will try to immediately reconnect to the server and increase the delay between attempts as successive reconnections keep failing._ -In case you want to force a reconnection while the reconnetion manager is +In case you want to force a reconnection while the reconnection manager is waiting for the next reconnection, you can just use _AbstractXMPPConnection#connect()_ and a new attempt will be made. If the manual attempt also failed then the reconnection manager will still continue the reconnection job.