#!/usr/bin/perl
use Net::Jabber;
$jabber = new Net::Jabber::Client();
$jabber->Connect(hostname => "fritalk.com",
port => 5222,
timeout => 90,
connectiontype => "tcpip",
ssl => 0);
@r = $jabber->AuthSend(username => "yannbng",
password => "********",
resource => "Perl-Net::Jabber",
register => 0);
$SIG{ALRM} = \&qqch;
$jabber->SetCallBacks( presence => \&handle_presence,
message => \&handle_message );
@contacts = $jabber->RosterGet();
$jabber->PresenceSend();
qqch();
print "Connecté !";
while(defined($jabber->Process())) { }
sub qqch {
$jabber->Process(1);
}
sub handle_message {
my $message = (…)
Forum Programmation.perl Problème avec Net::Jabber
J'ai un problème avec Perl et Net::Jabber. Voici mon code :