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. Advertising

  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. Advertising

  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. Advertising

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. James Mills

    XMPP xmpppy - User Authorization

    James Mills, Nov 5, 2008, in forum: Python
    Replies:
    0
    Views:
    370
    James Mills
    Nov 5, 2008
  2. James Mills

    Re: XMPP xmpppy - User Authorization

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

    webcam in gtalk/xmpp

    Astan Chee, Sep 15, 2010, in forum: Python
    Replies:
    0
    Views:
    305
    Astan Chee
    Sep 15, 2010
  4. Eric Will

    parsing xml (xmpp) with ruby

    Eric Will, Sep 27, 2008, in forum: Ruby
    Replies:
    3
    Views:
    255
    Eric Will
    Sep 27, 2008
  5. Diego Bernardes

    Send file over XMPP

    Diego Bernardes, Mar 7, 2010, in forum: Ruby
    Replies:
    0
    Views:
    139
    Diego Bernardes
    Mar 7, 2010
Loading...

Share This Page