Performs an IQ set/get request asynchronously and optionally invokes a callback method when the IQ response comes in.

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

Syntax

C#
public string IqRequestAsync(
	IqType type,
	Jid to = null,
	Jid from = null,
	XmlElement data = null,
	CultureInfo language = null,
	Action<string, Iq> callback = null
)

Parameters

type
Type: S22.Xmpp.Core..::..IqType
The type of the request. This must be either IqType.Set or IqType.Get.
to (Optional)
Type: S22.Xmpp..::..Jid
The JID of the intended recipient for the stanza.
from (Optional)
Type: S22.Xmpp..::..Jid
The JID of the sender.
data (Optional)
Type: System.Xml..::..XmlElement
he content of the stanza.
language (Optional)
Type: System.Globalization..::..CultureInfo
The language of the XML character data of the stanza.
callback (Optional)
Type: System..::..Action<(Of <(<'String, Iq>)>)>
A callback method which is invoked once the IQ response from the server comes in.

Return Value

The ID value of the pending IQ stanza request.

Exceptions

ExceptionCondition
System..::..ArgumentExceptionThe type parameter is not IqType.Set or IqType.Get.
System..::..ObjectDisposedExceptionThe XmppCore object has been disposed.
System..::..InvalidOperationExceptionThe XmppCore instance is not connected to a remote host.
System.IO..::..IOExceptionThere was a failure while writing to the network.

See Also