[JDEV] Net::Jabber and oob

2002-03-22 Thread Rico -mc- Gloeckner

Hi,

i wrote a tiny perl client for jabber and everything was working fine,
but when i get a Mail from, i.e. a Psi Client with oob Data for, i.e.
URLs, iam lost on how to decode them.

i have the callback for messages setup:

sub doMessage {
my $reference = shift;
my $message = shift;

my $mfrom   = $message->GetFrom()  || "";
[...]

Now, i thought, its an x Namespace, so it would be appropriate to get the
whole jabber:x:oob Entitity via:
my @mxspace = $message->GetX() || "";
I expected any Ref to handle the OOB Data, but all i got was a simple
"1". Since iam still a bit of unexperienced in advanced Perl Techniques
i tried to change the Context, i.e. to Scalar, Array and Hash, but none
seemed to work. Also trying to directly access the $message Object with
Methods which are valid for jabber:x:oob Objects failed, ofcourse.

Can someone enlighten me?


TIA,
-mc

-- 
| Rico -mc- Gloeckner |   <[EMAIL PROTECTED]>   | {ICQ:99798577} |
| http://www.ukeer.de | mc (at) irc.tu-ilmenau.de | <[EMAIL PROTECTED]> |
| Jabber: [EMAIL PROTECTED] |  :wq
___
jdev mailing list
[EMAIL PROTECTED]
http://mailman.jabber.org/listinfo/jdev



[JDEV] Net::Jabber and oob

2002-03-26 Thread Rico -mc- Gloeckner

Hi,

i wrote a tiny perl client for jabber and everything was working fine,
but when i get a Mail from, i.e. a Psi Client with oob Data for, i.e.
URLs, iam lost on how to decode them.

i have the callback for messages setup:

sub doMessage {
my $reference = shift;
my $message = shift;

my $mfrom   = $message->GetFrom()  || "";
[...]

Now, i thought, its an x Namespace, so it would be appropriate to get the
whole jabber:x:oob Entitity via:
my @mxspace = $message->GetX() || "";
I expected any Ref to handle the OOB Data, but all i got was a simple
"1". Since iam still a bit of unexperienced in advanced Perl Techniques
i tried to change the Context, i.e. to Scalar, Array and Hash, but none
seemed to work. Also trying to directly access the $message Object with
Methods which are valid for jabber:x:oob Objects failed, ofcourse.

Can someone enlighten me?


TIA,
-mc

-- 
| Rico -mc- Gloeckner |   <[EMAIL PROTECTED]>   | {ICQ:99798577} |
| http://www.ukeer.de | mc (at) irc.tu-ilmenau.de | <[EMAIL PROTECTED]> |
| Jabber: [EMAIL PROTECTED] |  :wq
___
jdev mailing list
[EMAIL PROTECTED]
http://mailman.jabber.org/listinfo/jdev



Re: [JDEV] Net::Jabber and oob

2002-03-22 Thread DJ Adams

On Fri, Mar 22, 2002 at 08:10:23PM +0100, Rico -mc- Gloeckner wrote:
> Now, i thought, its an x Namespace, so it would be appropriate to get the
> whole jabber:x:oob Entitity via:
> my @mxspace = $message->GetX() || "";
> I expected any Ref to handle the OOB Data, but all i got was a simple
> "1". Since iam still a bit of unexperienced in advanced Perl Techniques
> i tried to change the Context, i.e. to Scalar, Array and Hash, but none
> seemed to work. Also trying to directly access the $message Object with
> Methods which are valid for jabber:x:oob Objects failed, ofcourse.
> 

Hi

after the above line, all you need is something like this:

$mxspace[0]->GetURL()

and

$mxspace[0]->GetDesc()

to access the two bits of info carried in the x:oob extension

dj
___
jdev mailing list
[EMAIL PROTECTED]
http://mailman.jabber.org/listinfo/jdev



Re: [JDEV] Net::Jabber and oob

2002-03-25 Thread Rico -mc- Gloeckner

On Fri, Mar 22, 2002 at 09:35:24PM +, DJ Adams wrote:
> after the above line, all you need is something like this:
> 
> $mxspace[0]->GetURL()
> 
> and
> 
> $mxspace[0]->GetDesc()
> 
> to access the two bits of info carried in the x:oob extension

That was too easy, thanks =)

Three other Questions:

a) Does the "1" in the @mxspace Context count the Number of additional X
Object?
How do i know its an oob Object, and not a -lets say- Roster Object?

b) Is it possible to get the actual Filehandle of the Net::Jabber
$connection Object? I want to select() over stdin and the Jabber
Connection, so i actually dont need the $connection->Process(x) Timeout.

c) When the Server suddenly disconnects the Perl Client (w/o saying bye,
because its kill -9'ed or something), the perl Interpreter starts eatiny
100% CPU, it seems it hangs in ->Process(), which waits for Data on
a non-existing Connection. 


-rico

-- 
| Rico -mc- Gloeckner |   <[EMAIL PROTECTED]>   | {ICQ:99798577} |
| http://www.ukeer.de | mc (at) irc.tu-ilmenau.de | <[EMAIL PROTECTED]> |
| Jabber: [EMAIL PROTECTED] |  :wq
___
jdev mailing list
[EMAIL PROTECTED]
http://mailman.jabber.org/listinfo/jdev



[jdev@ukeer.de: Re: [JDEV] Net::Jabber and oob]

2002-04-26 Thread Rico -mc- Gloeckner

Heya,

I asked these Question a month ago and didnt get any Reply, maybe
someone can answer them now, since they seem important to me :-)


 Is it possible to get the actual Filehandle of the Net::Jabber
$connection Object? I want to select() over stdin and the Jabber
Connection, so i actually dont need the $connection->Process(x) Timeout.

 When the Server suddenly disconnects the Perl Client (w/o saying bye,
because its kill -9'ed or something), the perl Interpreter starts eatiny
100% CPU, it seems it hangs in ->Process(), which waits for Data on
a non-existing Connection. 


-rico

-- 
| Rico -mc- Gloeckner |   <[EMAIL PROTECTED]>   | {ICQ:99798577} |
| http://www.ukeer.de | mc (at) irc.tu-ilmenau.de | <[EMAIL PROTECTED]> |
| Jabber: [EMAIL PROTECTED] |  :wq
___
jdev mailing list
[EMAIL PROTECTED]
http://mailman.jabber.org/listinfo/jdev



Re: [jdev@ukeer.de: Re: [JDEV] Net::Jabber and oob]

2002-04-26 Thread Thomas Muldowney

You may want to try and email [EMAIL PROTECTED] directly.

--temas


On Fri, 2002-04-26 at 04:13, Rico -mc- Gloeckner wrote:
> Heya,
> 
> I asked these Question a month ago and didnt get any Reply, maybe
> someone can answer them now, since they seem important to me :-)
> 
> 
>  Is it possible to get the actual Filehandle of the Net::Jabber
> $connection Object? I want to select() over stdin and the Jabber
> Connection, so i actually dont need the $connection->Process(x) Timeout.
> 
>  When the Server suddenly disconnects the Perl Client (w/o saying bye,
> because its kill -9'ed or something), the perl Interpreter starts eatiny
> 100% CPU, it seems it hangs in ->Process(), which waits for Data on
> a non-existing Connection. 
> 
> 
>   -rico
> 
> -- 
> | Rico -mc- Gloeckner |   <[EMAIL PROTECTED]>   | {ICQ:99798577} |
> | http://www.ukeer.de | mc (at) irc.tu-ilmenau.de | <[EMAIL PROTECTED]> |
> | Jabber: [EMAIL PROTECTED] |  :wq
> ___
> jdev mailing list
> [EMAIL PROTECTED]
> http://mailman.jabber.org/listinfo/jdev


___
jdev mailing list
[EMAIL PROTECTED]
http://mailman.jabber.org/listinfo/jdev