2004-05-16 21:35:46 +00:00
|
|
|
#!/usr/bin/perl
|
|
|
|
|
|
|
|
use Net::SAM::RawSession;
|
|
|
|
use Net::SAM::DatagramSession;
|
|
|
|
|
|
|
|
$sam=Net::SAM::DatagramSession->new($ARGV[0], "BOTH", "tunnels.depthInbound=0");
|
|
|
|
print "Connected? " . $sam->connected() . "\n";
|
|
|
|
|
|
|
|
$me = $sam->lookup("ME");
|
|
|
|
print "Sending to $me.\n";
|
|
|
|
$sam->send($me,"fooquux");
|
|
|
|
|
|
|
|
$sam->readprocess();
|
|
|
|
($source, $message) = @{ $sam->receive() };
|
2004-05-16 21:44:23 +00:00
|
|
|
print "$source -- $message";
|
2004-05-16 21:35:46 +00:00
|
|
|
|
|
|
|
|
|
|
|
|