[JDEV] Net::Jabber vs. Jabber::Connection?

Rodrigo Bernardo Pimentel rbp at isnomore.net
Sat Jun 1 10:37:55 CDT 2002


        Hi there :)

        I'm a bit confused... I started writing a jabber client in Perl
using curses and Net::Jabber, as a programming exercise and as a means to
get myself more into jabber itself. But then it struck me as odd that I had
to either provide an integer number of seconds to Process() or leave it
blocking until it received any packets. In purely procedural programming, I
have to wait at least one second for the rest of the program to get
attention, and that includes an unpleasant delay in keystroke handling (for
example).

        I though of fork()ing and Process()ing in the child, communicating
via a socket or something, but then I saw DJ Adam's Jabber::Connection. His
process() simply exits if there's nothing to be processed in the queue,
which seems to me the Right Way (TM) to do it.

        Now, I'm not really sure Jabber::Connection and Net::Jabber actually
do the same thing (or should I say "are interchangeable"). Do/Are they? It
seemed so to me at first sight, and I was about to switch (even though
Net::Jabber seems to have function that give you what you want more promptly
(like GetFrom() etc)), but looking for examples on DJ Adam's page all I
found was programs using Net::Jabber, so, again, I got confused - are they
interchangeable? Or is Jabber::Connection directed towards soewhere else I
failed to recognize?

        Could anyone please show me the light? :)

        Thanks,


                rbp
______________________________________________________________________
 Rodrigo Bernardo Pimentel                         <rbp at isnomore.net>
 http://www.linuxsp.org.br                        http://isnomore.net
 GPG: <0x81F85A48>  7E62 9CA2 C95B FC86 B334 203E C011 2E4D 81F8 5A48 

... You could spend *all day* customizing the title bar.
Believe me. I speak from experience.
          -- Matt Welsh



More information about the JDev mailing list