Not logged in. · Lost password · Register
Forum: MatriX RSS
SendIqSynchronous get never returns
Avatar
Beaker #1
Member since Mar 2010 · 7 posts
Group memberships: Members
Show profile · Link to this post
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
Member since Mar 2010 · 7 posts
Group memberships: Members
Show profile · Link to this post
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, 19:48 by Beaker.
Avatar
Alex #3
Member since Feb 2003 · 4297 posts · Location: Germany
Group memberships: Administrators, Members
Show profile · Link to this post
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, 21: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.)
Smileys: :-) ;-) :-D :-p :blush: :cool: :rolleyes: :huh: :-/ <_< :-( :'( :#: :scared: 8-( :nuts: :-O
Special characters:
Forum: MatriX RSS