Debian lenny version packages
[pkg-perl] / deb-src / libnet-ssleay-perl / libnet-ssleay-perl-1.35 / examples / tcpcat.pl
1 #!/usr/bin/perl
2 # tcpcat.pl - Send a message and receive a reply from TCP server.
3 #
4 # Copyright (c) 2003 Sampo Kellomaki <sampo@iki.fi>, All Rights Reserved.
5 # $Id$
6 # 17.8.2003, created --Sampo
7  
8 $host = 'localhost' unless $host = shift;
9 $port = 443         unless $port = shift;
10 $msg = "get \n\r\n" unless $msg = shift;
11
12 print "$host $port $msg\n";
13 use Net::SSLeay qw(tcpcat);
14 print tcpcat($host, $port, $msg);
15  
16 __END__