Initializes a new instance of the XmppClient class.
Namespace: S22.Xmpp.ClientAssembly: S22.Xmpp (in S22.Xmpp.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax
C# |
---|
public XmppClient( string hostname, string username, string password, int port = 5222, bool tls = true, RemoteCertificateValidationCallback validate = null ) |
Parameters
- hostname
- Type: System..::..String
The hostname of the XMPP server to connect to.
- username
- Type: System..::..String
The username with which to authenticate. In XMPP jargon this is known as the 'node' part of the JID.
- password
- Type: System..::..String
The password with which to authenticate.
- 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 connect to an XMPP server using
an existing set of user credentials.
Exceptions
Exception | Condition |
---|---|
System..::..ArgumentNullException | The hostname parameter or the username parameter or the password parameter is null. |
System..::..ArgumentException | The hostname parameter or the username parameter is the empty string. |
System..::..ArgumentOutOfRangeException | The value of the port parameter is not a valid port number. |