diff options
author | James Meyer <james.meyer@operamail.com> | 2008-11-09 02:33:06 (GMT) |
---|---|---|
committer | James Meyer <james.meyer@operamail.com> | 2008-11-09 02:33:06 (GMT) |
commit | 1ba69cc033dfbd0a6c4c29c6d877c7e753f96e8e (patch) | |
tree | f336ee91ce16c6591fff50340562e07e15aa1a55 /abs/mv-core/ghosd/osdClient.pl | |
parent | 75b1bceb21faab32d8f519d6f7f7062a226f9047 (diff) | |
download | linhes_pkgbuild-1ba69cc033dfbd0a6c4c29c6d877c7e753f96e8e.zip linhes_pkgbuild-1ba69cc033dfbd0a6c4c29c6d877c7e753f96e8e.tar.gz linhes_pkgbuild-1ba69cc033dfbd0a6c4c29c6d877c7e753f96e8e.tar.bz2 |
MythVantage specific pkgs
Diffstat (limited to 'abs/mv-core/ghosd/osdClient.pl')
-rwxr-xr-x | abs/mv-core/ghosd/osdClient.pl | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/abs/mv-core/ghosd/osdClient.pl b/abs/mv-core/ghosd/osdClient.pl new file mode 100755 index 0000000..06fc381 --- /dev/null +++ b/abs/mv-core/ghosd/osdClient.pl @@ -0,0 +1,25 @@ +#!/usr/bin/perl -w +# osdClient.pl - send simple client text to server + +use strict; +use IO::Socket::INET; +use POSIX qw(F_GETFL F_SETFL O_NONBLOCK); +my $sock = ""; + +if( $#ARGV != 2 ){ die "specify a ip, port, text string" } + +eval +{ + $sock = IO::Socket::INET->new( + PeerAddr => $ARGV[0], + PeerPort => $ARGV[1]) || die "can't set it up $!"; + + $sock->blocking(0) +}; + +if( $@ =~ /socket/i ) +{ + print "die in record retrieval socket setup with $@"; +} + +print $sock "$ARGV[2] \n"; |