Blocking XMPP API?

Discussion in 'Python' started by Gabriel Rossetti, Jul 9, 2009.

  1. Hello everyone,

    I am looking for blocking XMPP API. I'm wanting to make a webservice
    that uses XMPP, but all the XMPP libs I find are non-blocking (i.e. w/
    callbacks). I'd like to be able to do something like :

    cl = Client("/res01", "password",)
    msg = "<m....."
    result = cl.send(msg)
    print "I got '%s'" % str(result)

    any ideas? Using Java I have Smack which can either get msgs sync or
    async, but I found nothing that can do this in Python.

    Thanks,
    Gabriel

    --
    Arimaz SA
    Ingénieur en Informatique
    Av. du 24 Janvier 11
    Ateliers de la Ville de Renens, Atelier 5
    1020 Renens, Switzerland
    www.arimaz.com
    www.mydeskfriend.com
    Mob: +41-(0)79-539-0069
    Tel: +41-(0)21-566-7343
     
    Gabriel Rossetti, Jul 9, 2009
    #1
    1. Advertisements

  2. In message <>, Gabriel
    Rossetti wrote:

    > I am looking for blocking XMPP API. I'm wanting to make a webservice
    > that uses XMPP, but all the XMPP libs I find are non-blocking (i.e. w/
    > callbacks).


    So why not have the caller sleep or something until the callback is invoked?

    It's easier to turn an async API into a synchronous one than the other way
    round.
     
    Lawrence D'Oliveiro, Jul 13, 2009
    #2
    1. Advertisements

  3. Lawrence D'Oliveiro wrote:
    > In message <>, Gabriel
    > Rossetti wrote:
    >
    >
    >> I am looking for blocking XMPP API. I'm wanting to make a webservice
    >> that uses XMPP, but all the XMPP libs I find are non-blocking (i.e. w/
    >> callbacks).
    >>

    >
    > So why not have the caller sleep or something until the callback is invoked?
    >
    > It's easier to turn an async API into a synchronous one than the other way
    > round.
    >
    >

    Yes, that is what I ended up doing, thanks for the response though :)

    Gabriel
     
    Gabriel Rossetti, Jul 13, 2009
    #3
    1. Advertisements

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Hendra Gunawan
    Replies:
    1
    Views:
    17,406
    Allan Herriman
    Apr 8, 2004
  2. Andre Kelmanson

    blocking i/o vs. non blocking i/o (performance)

    Andre Kelmanson, Oct 10, 2003, in forum: C Programming
    Replies:
    3
    Views:
    1,310
    Valentin Tihomirov
    Oct 12, 2003
  3. nukleus
    Replies:
    14
    Views:
    1,298
    Chris Uppal
    Jan 22, 2007
  4. Christian
    Replies:
    5
    Views:
    958
    Esmond Pitt
    Dec 2, 2007
  5. James Mills

    XMPP xmpppy - User Authorization

    James Mills, Nov 5, 2008, in forum: Python
    Replies:
    0
    Views:
    493
    James Mills
    Nov 5, 2008
  6. James Mills

    Re: XMPP xmpppy - User Authorization

    James Mills, Nov 5, 2008, in forum: Python
    Replies:
    3
    Views:
    924
    Henson
    Dec 15, 2008
  7. Astan Chee

    webcam in gtalk/xmpp

    Astan Chee, Sep 15, 2010, in forum: Python
    Replies:
    0
    Views:
    471
    Astan Chee
    Sep 15, 2010
  8. Serge Savoie
    Replies:
    4
    Views:
    557
    Serge Savoie
    Oct 1, 2008
Loading...