1
0
Fork 0
mirror of https://codeberg.org/Mercury-IM/Smack synced 2024-11-25 15:52:06 +01:00

Update/Edit documentation

This commit is contained in:
Jesus Fuentes 2018-04-01 08:43:29 -05:00
parent a9ca1a0989
commit d60f3d1ee6

View file

@ -6,11 +6,10 @@ Smack: XMPPConnection Management
Creating a Connection 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 an XMPP server. The default implementation is the
`org.jivesoftware.smack.XMPPTCPConnection` class. Two constructors are mainly `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
used. The first, `XMPPTCPConnection(String)` takes the server name you'd like to connect to as arguments. All default connection settings will be used:
to connect to as an argument. 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. * 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. * 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 By default Smack will try to reconnect the connection in case it was abruptly
disconnected. Use _ConnectionConfiguration#setReconnectionAllowed(boolean) to disconnected. The reconnection manager will try to immediately
turn on/off this feature. The reconnection manager will try to immediately
reconnect to the server and increase the delay between attempts as successive reconnect to the server and increase the delay between attempts as successive
reconnections keep failing._ 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()_ 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 and a new attempt will be made. If the manual attempt also failed then the
reconnection manager will still continue the reconnection job. reconnection manager will still continue the reconnection job.