1
0
Fork 0
mirror of https://github.com/vanitasvitae/Smack.git synced 2025-09-10 01:29:38 +02:00

Documentation work.

git-svn-id: http://svn.igniterealtime.org/svn/repos/smack/trunk@7330 b35dd754-fafc-0310-a699-88a17e54d16e
This commit is contained in:
Matt Tucker 2007-03-01 01:51:12 +00:00 committed by matt
parent 9189d74d0a
commit f418341e2b
6 changed files with 108 additions and 25 deletions

View file

@ -0,0 +1,69 @@
<html>
<head>
<title>Smack: Connection Management - Jive Software</title>
<link rel="stylesheet" type="text/css" href="style.css"/>
</head>
<body>
<div class="header">
Smack: Connection Management
</div>
<div class="nav">
&laquo; <a href="index.html">Table of Contents</a>
</div>
<p class="subheader">
Creating a Connection
</p>
<p>
The <tt>org.jivesoftware.smack.XMPPConnection</tt> class manages your connection to an XMPP
server. Two constructors are available. The first, <tt>XMPPConnection(String)</tt> takes
the server name you'd like to connect to as an argument. All default connection settings will
be used:
<ul>
<li>A DNS SRV lookup will be performed to find the exact address and port (typically 5222)
that the server resides at.</li>
<li>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.
</li>
<li>The XMPP resource name "Smack" will be used for the connection.</li>
</ul>
Alternatively, you can use the <tt>XMPPServer(ConnectionConfiguration)</tt> constructor to
specify advanced connection settings. Some of these settings include:
<ul>
<li>Manually specify the server address and port of the server rather than using a DNS SRV
lookup.</li>
<li>Enable connection compression.</li>
<li>Customize security settings, such as flagging the connection to require TLS encryption
in order to connect.</li>
<li>Specify a custom connection resource name such as "Work" or "Home". Every connection
by a user to a server must have a unique resource name. For the user "jsmith@example.com", the
full address with resource might be "jsmith@example.com/Smack". With unique resource names, a user
can be logged into the server from multiple locations at once, or using multiple devices. The
presence priority value used with each resource will determine which particular connection
receives messages to the bare address ("jsmith@example.com" in our example).</li>
</ul>
</p>
<p class="subheader">
Connect and Disconnect
</p>
<br clear="all"/><br><br>
<div class="footer">
Copyright &copy; Jive Software 2002-2007
</div>
</body>
</html>