Performs an IQ set/get request and blocks until the response IQ 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 Iq IqRequest(
	Iq request,
	int millisecondsTimeout = -1
)

Parameters

request
Type: S22.Xmpp.Core..::..Iq
The IQ request to send.
millisecondsTimeout (Optional)
Type: System..::..Int32
The number of milliseconds to wait for the arrival of the IQ response or -1 to wait indefinitely.

Return Value

The IQ response sent by the server.

Exceptions

ExceptionCondition
System..::..ArgumentNullExceptionThe request parameter is null.
System..::..ArgumentExceptionThe type parameter is not IqType.Set or IqType.Get.
System..::..ArgumentOutOfRangeExceptionThe value of millisecondsTimeout is a negative number other than -1, which represents an indefinite timeout.
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, or there was a failure reading from the network.
System..::..TimeoutExceptionA timeout was specified and it expired.

See Also