XMPP Component

Properties   Methods   Events   Configuration Settings   Errors  

The XMPP Component is used to create a lightweight messaging client using the XMPP (Jabber) protocol.

Syntax

nsoftware.IPWorksMQ.Xmpp

Remarks

The XMPP component supports both plaintext and SSL/TLS connections. When connecting over SSL/TLS the SSLServerAuthentication event allows you to check the server identity and other security attributes. The SSLStatus event provides information about the SSL handshake. Additional SSL related settings are also supported via the Config method.

A call to the Connect method will perform the entire logon process after which a Connected event will fire indicating connection status. For simplicity, the entire interface is synchronous; the component will not return until a call is completed.

After a successful connection, the component will automatically begin the process of receiving the user's buddy list. The component will parse the XML as it comes in from the server and will set the appropriate properties. Once the entire buddy list has been retrieved, a Sync event will fire.

Sending a message is as simple as calling a single method. One call to the SendMessage method will cause the component to connect if it has not already done so, send the specified message to a specified user, and return to the original connection state.

The XMPP Component interface supports messaging, list and presence management. Other features of the XMPP protocol are supported through the SendCommand method and PITrail event.

Example (Connecting and Sending a Message)


IMControl.Connect("myusername", "mypassword")
IMControl.MessageText = "My Message"
IMControl.SendMessage("ToUser")
Example (Sending a Single Message)


IMControl.User = "myusername"
IMControl.Password = "mypassword"
IMControl.MessageText = "My Message"
IMControl.SendMessage("ToUser")

Property List


The following is the full list of the properties of the component with short descriptions. Click on the links for further details.

AuthDomainThe domain under which the user will be authenticated.
AuthMethodsControls how the component authenticates itself with the XMPP server.
BuddiesCollection of buddies in the buddy list.
ConnectedThis indicates the component's login status.
FirewallA set of properties related to firewall access.
IMPortThe server port for XMPP (default 5222).
IMServerThis is the instant messaging server.
LocalDirectoryThe directory to which received files are saved.
LocalFileThe path to the file that will be sent.
LocalHostThe name of the local host or user-assigned IP interface through which connections are initiated or accepted.
MessageHTMLThis is the HTML version of the current message.
MessageOtherDataThis property contains extra data elements for the current message.
MessageSubjectThis is the subject of the current message.
MessageTextThis is the plain text of the current message.
MessageThreadThis is the thread name of the current message.
MessageTypeThis is the type of the current message.
PasswordThis is the user's password.
PresenceThis is the availability of the entity.
ResourceThis is the resource for the current session.
ServerDomainThe XMPP server's domain.
SSLAcceptServerCertInstructs the component to unconditionally accept the server certificate that matches the supplied certificate.
SSLCertThe certificate to be used during SSL negotiation.
SSLEnabledWhether TLS/SSL is enabled.
SSLServerCertThe server certificate for the last established connection.
SSLStartModeDetermines how the component starts the SSL negotiation.
StatusDescription of the availability of this entity.
TimeoutA timeout for the component.
UserThe user portion of this entity's Jabber ID.
UserDomainGets or sets the domain value used for Jabber IDs.
UserInfoCollection of named registration fields.

Method List


The following is the full list of the methods of the component with short descriptions. Click on the links for further details.

AddThis method will add an entity to this entity's roster.
CancelThis will cancel another entity's subscription to this entity's presence.
ChangePasswordThis method will change the current user's password.
ChangePresenceThis method will set the availability and status of this entity.
ConfigSets or retrieves a configuration setting.
ConnectThis method will connect the component to the server.
DisconnectThis method disconnects the component from the server.
DoEventsThis method processes events from the internal message queue.
InterruptInterrupt the current method.
ProbePresenceUse this method to probe for another entity's presence.
QueryRegisterThis method queries a server for the necessary registration fields.
RegisterThis method registers an account with a server.
RemoveThis method will remove an entity from this entity's roster.
ResetReset the component.
RetrieveRosterThis method will retrieve this entity's roster from the server.
SendCommandThis method sends a command to the server.
SendFileSends a file to the specified user.
SendMessageThis method will send a message to the specified user.
SetReceiveStreamSets the stream to which the received file data from will be written.
SetSendStreamSets the stream to be sent.
SetUserInfoFieldThis method will add a user information field for registration.
SubscribeToUse this method to subscribe to another entity's presence.
UnregisterThis method cancels an account with the host.
UnsubscribeToThis method will cancel a subscription to another entity's presence.

Event List


The following is the full list of the events fired by the component with short descriptions. Click on the links for further details.

BuddyUpdateThis event is fired whenever a roster entry is updated.
ConnectedThis event is fired when a connection to the IM Server is completed.
ConnectionStatusFired to indicate changes in connection state.
DisconnectedThis event is fired when the chat service connection is lost.
EndTransferFired when a file transfer completes.
ErrorThis event is fired when the server sends a protocol error message.
IQThis event is fired for IQ messages not normally supported by the component.
MessageInThis event is fired upon receipt of a message.
PITrailThis event is fired for all protocol messages.
PresenceThis event is fired when the presence of a subscribed entity changes.
ReadyToSendFired when the component is ready to send data.
SSLServerAuthenticationFired after the server presents its certificate to the client.
SSLStatusShows the progress of the secure connection.
StartTransferFired when a file transfer begins.
SubscriptionRequestThis event fires when a subscription request is received.
SyncThis event fires upon a complete information synchronization with the server.
TransferFired during file transfer.

Configuration Settings


The following is a list of configuration settings for the component with short descriptions. Click on the links for further details.

AccessTokenThe OAuth access token used for authentication.
BlockSizeSpecifies the block size for file transfers.
ClientIdThe OAuth client Id used for authentication.
MessageXMLReturns the last root-level element received by the component.
OverwriteSpecifies whether or not to overwrite received files.
ParseHTMLTells XMPP whether or not to parse MessageHTML when it's set.
RetrieveRosterWhether to automatically retrieve the roster when logging in.
SendSubscriptionResponseDetermines whether a response will be sent to a Subscription Request.
UseCompressionSpecified whether or not stream compression is used.
CloseStreamAfterTransferIf true, the component will close the upload or download stream after the transfer.
ConnectionTimeoutSets a separate timeout value for establishing a connection.
FirewallAutoDetectTells the component whether or not to automatically detect and use firewall system settings, if available.
FirewallHostName or IP address of firewall (optional).
FirewallListenerIf true, the component binds to a SOCKS firewall as a server (IPPort only).
FirewallPasswordPassword to be used if authentication is to be used when connecting through the firewall.
FirewallPortThe TCP port for the FirewallHost;.
FirewallTypeDetermines the type of firewall to connect through.
FirewallUserA user name if authentication is to be used connecting through a firewall.
KeepAliveIntervalThe retry interval, in milliseconds, to be used when a TCP keep-alive packet is sent and no response is received.
KeepAliveTimeThe inactivity time in milliseconds before a TCP keep-alive packet is sent.
LingerWhen set to True, connections are terminated gracefully.
LingerTimeTime in seconds to have the connection linger.
LocalHostThe name of the local host through which connections are initiated or accepted.
LocalPortThe port in the local host where the component binds.
MaxLineLengthThe maximum amount of data to accumulate when no EOL is found.
MaxTransferRateThe transfer rate limit in bytes per second.
ProxyExceptionsListA semicolon separated list of hosts and IPs to bypass when using a proxy.
TCPKeepAliveDetermines whether or not the keep alive socket option is enabled.
TcpNoDelayWhether or not to delay when sending packets.
UseIPv6Whether to use IPv6.
UseNTLMv2Whether to use NTLM V2.
CACertFilePathsThe paths to CA certificate files when using Mono on Unix/Linux.
LogSSLPacketsControls whether SSL packets are logged when using the internal security API.
ReuseSSLSessionDetermines if the SSL session is reused.
SSLCACertsA newline separated list of CA certificate to use during SSL client authentication.
SSLCheckCRLWhether to check the Certificate Revocation List for the server certificate.
SSLCipherStrengthThe minimum cipher strength used for bulk encryption.
SSLEnabledCipherSuitesThe cipher suite to be used in an SSL negotiation.
SSLEnabledProtocolsUsed to enable/disable the supported security protocols.
SSLEnableRenegotiationWhether the renegotiation_info SSL extension is supported.
SSLIncludeCertChainWhether the entire certificate chain is included in the SSLServerAuthentication event.
SSLNegotiatedCipherReturns the negotiated ciphersuite.
SSLNegotiatedCipherStrengthReturns the negotiated ciphersuite strength.
SSLNegotiatedCipherSuiteReturns the negotiated ciphersuite.
SSLNegotiatedKeyExchangeReturns the negotiated key exchange algorithm.
SSLNegotiatedKeyExchangeStrengthReturns the negotiated key exchange algorithm strength.
SSLNegotiatedProtocolReturns the negotiated protocol version.
SSLProviderThe name of the security provider to use.
SSLSecurityFlagsFlags that control certificate verification.
SSLServerCACertsA newline separated list of CA certificate to use during SSL server certificate validation.
TLS12SignatureAlgorithmsDefines the allowed TLS 1.2 signature algorithms when UseInternalSecurityAPI is True.
TLS12SupportedGroupsThe supported groups for ECC.
TLS13KeyShareGroupsThe groups for which to pregenerate key shares.
TLS13SignatureAlgorithmsThe allowed certificate signature algorithms.
TLS13SupportedGroupsThe supported groups for (EC)DHE key exchange.
AbsoluteTimeoutDetermines whether timeouts are inactivity timeouts or absolute timeouts.
FirewallDataUsed to send extra data to the firewall.
InBufferSizeThe size in bytes of the incoming queue of the socket.
OutBufferSizeThe size in bytes of the outgoing queue of the socket.

Copyright (c) 2022 /n software inc. - All rights reserved.
IPWorks MQ 2020 .NET Edition - Version 20.0 [Build 8155]