Not logged in. · Lost password · Register
Forum: MatriX and XmppDotNet RSS
SendIqSynchronous get never returns
Avatar
Beaker #1
Subject: VCard
the following is from the MiniClient and works for the account used to test

            viq = new VcardIq() {Type = IqType.get, To = _jid.Bare};
          
            xmppClient.IqFilter.SendIq(viq, VcardResult, null);

however, when I replace the second line with this

            Iq iq = xmppClient.IqFilter.SendIqSynchronous(viq, 3000);

no matter how long the timeout, the call always times out and returns null

Thanks in advance
Avatar
Beaker #2
Subject: Additional detail
Placing this call onto a background thread helps some but the IqFilter does not seem to be able to accept VCardResult if the GUI thread has not returned.

gui_click
{
   Threadstart x = new Threadstart(MethodThatCallsSendIqSynchronously);
   Thread t = new Thread(x);
   t.start();
   Thread.Sleep(10000);
}

if gui_click does not return before the SendIqSynchronous timeout, SendIqSynchronous returns null
This post was edited on 2010-03-25, 20:48 by Beaker.
Avatar
Alex #3
The Synchronous IqFilter must be in a seperate thread like described here:
http://www.ag-software.net/matrix-xmpp-sdk/matrix-develope…

otherwise you app blocks MatriX and they time out. Why are you not using the Asynchronous IqFilters?

Alex
This post was edited on 2013-02-25, 22:27 by Alex.
Close Smaller – Larger + Reply to this post:
Verification code: VeriCode Please enter the word from the image into the text field below. (Type the letters only, lower case is okay.)