Establishes a connection to the XMPP server.

Namespace: S22.Xmpp.Core
Assembly: 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, it is assigned by the server.

Remarks

If a username has been supplied, this method automatically performs authentication.

Exceptions

ExceptionCondition
System.Net.Sockets..::..SocketExceptionAn error occurred while accessing the socket used for establishing the connection to the XMPP server. Use the ErrorCode property to obtain the specific error code.
System.Security.Authentication..::..AuthenticationExceptionAn 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 TLS has been turned off.
S22.Xmpp..::..XmppExceptionAn XMPP error occurred while negotiating the XML stream with the server.
System..::..ObjectDisposedExceptionThe XmppCore object has been disposed.

See Also