[aprssig] Perl socket programming
Andrew Rich vk4tec at people.net.auThu Apr 10 12:52:12 UTC 2008
- Previous message: [aprssig] KPC3+ beacons
- Next message: [aprssig] Perl socket programming
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Any one good at socket programming ?
I am trying to UDP some hex characters.
Something so simple is turning out to be hard to find.
Here is how to do it as a string, I just want to send hex instead
#!/usr/bin/perl -w
# clientIO.pl - a simple client using
# IO::Socket
use strict;
use IO::Socket;
my $host = shift || 'localhost';
my $port = shift || 30003;
my $sock = new IO::Socket::INET(
PeerAddr => $host,
PeerPort => $port,
Proto => 'udp');
$sock or die "no socket :$!";
foreach my $i (1..10) {
print $sock "hello, world: $i\n";
sleep 1;
}
close $sock;
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.tapr.org/pipermail/aprssig/attachments/20080410/8cff7d89/attachment.htm
- Previous message: [aprssig] KPC3+ beacons
- Next message: [aprssig] Perl socket programming
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
More information about the aprssig mailing list
