File:  [mozdev] / bitaacj / src / client.pl
Revision 1.6: download - view: text, annotated - select for diffs - revision graph
Fri Mar 31 11:02:40 2006 UTC (11 years, 6 months ago) by cherian
Branches: MAIN
CVS tags: HEAD
dunno abt this change

#!/usr/bin/perl -w
use strict;
use IO::Socket;

my $sock = new IO::Socket::INET (
                                 PeerAddr => 'mecserver',
                                  PeerPort => '27070',
                                  Proto => 'tcp',
                                 );
 die "Could not create socket: $!\n" unless $sock;
my $iplist;
#$sock->autoflush();
#$sock->autoflush();

#$sock->send("ADD12345678901234567890123456789012");
#$sock->flush();
#sleep 2;
$sock->send("GET004");
$sock->send("12345678901234567890123456789012#1234567890123456789012345678901&1234567890123456789012345678901*1234567890123456789012345678901");
#$sock->send("GET004722E52151572F4A253874128B35E8701B79C3244C053F4EF5434A5B75168C41EEC43B16FB663DDBB7E1EDADF0B9D9953BD92FB658F18BA50EBDE51BDB2527C99");
$sock->flush();
my $buf;
$sock->recv($buf,4);
print "Recieved size is .....". $sock."\n";
$sock->recv($iplist,$buf);

print "Recieved back____" . $iplist. "\n";

close($sock);

FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>