1
0
Fork 0
mirror of https://codeberg.org/Mercury-IM/Smack synced 2024-12-22 12:37:58 +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
---------------------
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.