12 $conn="localhost:4433";
13 $conn=$ARGV[0] if $#ARGV >= 0;
14 $bio=SSLeay::BIO::new("connect");
15 #$bio->set_callback(sub {print STDERR SSLeay::BIO::number_read($_[0])."\n"; $_[$#_] });
16 #$bio->set_callback(sub {print STDERR "$#_:".$_[0].":$_[1]:$_[2]:$_[3]:$_[4]:\n"; $_[$#_] });
17 $bio->hostname($conn) || die $ssl->error();
20 (($ret=$bio->do_handshake()) > 0) || die $bio->error();
22 (($ret=$bio->syswrite($cmd)) > 0) || die $bio->error();
26 $ret=$bio->sysread($buf,10240);