Establishes a connection to the XMPP server.
Namespace: S22.Xmpp.ClientAssembly: S22.Xmpp (in S22.Xmpp.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax
| C# |
|---|
public void Connect( string resource = null ) |
Parameters
- resource (Optional)
- Type: System..::..String
The resource identifier to bind with. If this is null, a resource identifier will be assigned by the server.
Return Value
The user's roster (contact list).
Exceptions
| Exception | Condition |
|---|---|
| System.Security.Authentication..::..AuthenticationException | An authentication error occured while trying to establish a secure connection, or the provided credentials were rejected by the server, or the server requires TLS/SSL and the Tls property has been set to false. |
| System.IO..::..IOException | There was a failure while writing to or reading from the network. If the InnerException is of type SocketExcption, use the ErrorCode property to obtain the specific socket error code. |
| System..::..ObjectDisposedException | The XmppClient object has been disposed. |
| S22.Xmpp..::..XmppException | An XMPP error occurred while negotiating the XML stream with the server, or resource binding failed, or the initialization of an XMPP extension failed. |