source:
apps/sam/perl/samcat.pl
@
2df4370
Last change on this file since 2df4370 was 1cf7dac, checked in by , 17 years ago | |
---|---|
|
|
File size: 384 bytes |
Line | |
---|---|
1 | #!/usr/bin/perl |
2 | |
3 | use Net::SAM::RawSession; |
4 | use Net::SAM::DatagramSession; |
5 | |
6 | $sam=Net::SAM::DatagramSession->new($ARGV[0], "BOTH", "tunnels.depthInbound=0"); |
7 | print "Connected? " . $sam->connected() . "\n"; |
8 | |
9 | $me = $sam->lookup("ME"); |
10 | print "Sending to $me.\n"; |
11 | $sam->send($me,"fooquux"); |
12 | |
13 | $sam->readprocess(); |
14 | ($source, $message) = @{ $sam->receive() }; |
15 | print "$source -- $message"; |
16 | |
17 | |
18 |
Note: See TracBrowser
for help on using the repository browser.