mirror of
https://codeberg.org/Mercury-IM/Smack
synced 2024-11-22 06:12:05 +01:00
Add XMPPTCPConnection(CharSequence, String) constructor
This commit is contained in:
parent
943dc29f92
commit
96e3d5c533
1 changed files with 15 additions and 0 deletions
|
@ -280,6 +280,21 @@ public class XMPPTCPConnection extends AbstractXMPPConnection {
|
|||
this.config = config;
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates a new XMPP connection over TCP.
|
||||
* <p>
|
||||
* Note that {@code jid} must be the bare JID, e.g. "user@example.org". More fine-grained control over the
|
||||
* connection settings is available using the {@link #XMPPTCPConnection(XMPPTCPConnectionConfiguration)}
|
||||
* constructor.
|
||||
* </p>
|
||||
*
|
||||
* @param jid the bare JID used by the client.
|
||||
* @param password the password or authentication token.
|
||||
*/
|
||||
public XMPPTCPConnection(CharSequence jid, String password) {
|
||||
this(XmppStringUtils.parseLocalpart(jid.toString()), password, XmppStringUtils.parseDomain(jid.toString()));
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates a new XMPP connection over TCP.
|
||||
* <p>
|
||||
|
|
Loading…
Reference in a new issue