Initializes a new instance of the XmppClient class.

Namespace: S22.Xmpp.Client
Assembly: S22.Xmpp (in S22.Xmpp.dll) Version: 1.0.0.0 (1.0.0.0)

Syntax

C#
public XmppClient(
	string hostname,
	int port = 5222,
	bool tls = true,
	RemoteCertificateValidationCallback validate = null
)

Parameters

hostname
Type: System..::..String
The hostname of the XMPP server to connect to.
port (Optional)
Type: System..::..Int32
The port number of the XMPP service of the server.
tls (Optional)
Type: System..::..Boolean
If true the session will be TLS/SSL-encrypted if the server supports TLS/SSL-encryption.
validate (Optional)
Type: System.Net.Security..::..RemoteCertificateValidationCallback
A delegate used for verifying the remote Secure Sockets Layer (SSL) certificate which is used for authentication. Can be null if not needed.

Remarks

Use this constructor if you wish to register an XMPP account using the in-band account registration process supported by some servers.

Exceptions

ExceptionCondition
System..::..ArgumentNullExceptionThe hostname parameter is null.
System..::..ArgumentExceptionThe hostname parameter is the empty string.
System..::..ArgumentOutOfRangeExceptionThe value of the port parameter is not a valid port number.

See Also