[Spread-users] question about Spread::multicast

Gustavo Soares gustavosoares at gmail.com
Tue Sep 18 10:18:32 EDT 2007


hello!

I have been trying the Spread perl module to write a script to send messages
from a specific log file to a remote spread daemon on the same network. Here
is the piece of code that use to send the messages

sub sendMessage {
        my $line = shift;
        my $mesg_length = length($line);
        if((my $ret = Spread::multicast($mbox, SAFE_MESS, $joined[0], 0,
$line))<=0) {
               print "Failed to send message (".$mesg_length." bytes) for
the group [@joined[0]], reason: $sperrno message: $line";
               print "ret_code: $ret\n\n";
               $fails++;
        }
}

I start the script and after a while I received the following error and no
more messages are sent until I kill restart the script.

Failed to send message (174 bytes) to group [mygroup], reason: spread_name
message: "hello world"
ret_code:

It looks like that the value returned by the $sperrno variable is
"spread_name" and that the variable $ret, which should have
the error code returned, is empty or null. I´ve read the documentation and
couldn´t find a reason for this behaviour... Anyone
has a clue of what I might be doing wrong?

Thanks in advance,
Gus
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.spread.org/pipermail/spread-users/attachments/20070918/dcb5833e/attachment.html 


More information about the Spread-users mailing list