hello!<br><br>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<br>
<br>sub sendMessage {<br> my $line = shift;<br> my $mesg_length = length($line);<br> if((my $ret = Spread::multicast($mbox, SAFE_MESS, $joined[0], 0, $line))<=0) {<br> print "Failed to send message (".$mesg_length." bytes) for the group [@joined[0]], reason: $sperrno message: $line";
<br> print "ret_code: $ret\n\n";<br> $fails++;<br> }<br>}<br><br>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.
<br><br>Failed to send message (174 bytes) to group [mygroup], reason: spread_name message: "hello world"<br>ret_code:<br><br>It looks like that the value returned by the $sperrno variable is "spread_name" and that the variable $ret, which should have
<br>the error code returned, is empty or null. Iīve read the documentation and couldnīt find a reason for this behaviour... Anyone<br>has a clue of what I might be doing wrong?<br><br>Thanks in advance,<br>Gus<br><br><br>
<br><br>