Add ARM files
[dh-make-perl] / dev / arm / libnet-ssleay-perl / libnet-ssleay-perl-1.35 / debian / libnet-ssleay-perl / usr / lib / perl5 / auto / Net / SSLeay / open_proxy_tcp_connection.al
diff --git a/dev/arm/libnet-ssleay-perl/libnet-ssleay-perl-1.35/debian/libnet-ssleay-perl/usr/lib/perl5/auto/Net/SSLeay/open_proxy_tcp_connection.al b/dev/arm/libnet-ssleay-perl/libnet-ssleay-perl-1.35/debian/libnet-ssleay-perl/usr/lib/perl5/auto/Net/SSLeay/open_proxy_tcp_connection.al
new file mode 100644 (file)
index 0000000..2af9fb0
--- /dev/null
@@ -0,0 +1,31 @@
+# NOTE: Derived from blib/lib/Net/SSLeay.pm.
+# Changes made here will be lost when autosplit is run again.
+# See AutoSplit.pm.
+package Net::SSLeay;
+
+#line 1834 "blib/lib/Net/SSLeay.pm (autosplit into blib/lib/auto/Net/SSLeay/open_proxy_tcp_connection.al)"
+### Open connection via standard web proxy, if one was defined
+### using set_proxy().
+
+sub open_proxy_tcp_connection {
+    my ($dest_serv, $port) = @_;
+    return open_tcp_connection($dest_serv, $port) if !$proxyhost;
+    
+    warn "Connect via proxy: $proxyhost:$proxyport" if $trace>2;
+    my ($ret, $errs) = open_tcp_connection($proxyhost, $proxyport);
+    return wantarray ? (0, $errs) : 0 if !$ret;  # Connection fail
+    
+    warn "Asking proxy to connect to $dest_serv:$port" if $trace>2;
+    #print SSLCAT_S "CONNECT $dest_serv:$port HTTP/1.0$proxyauth$CRLF$CRLF";
+    #my $line = <SSLCAT_S>;   # *** bug? Mixing stdio with syscall read?
+    ($ret, $errs) =
+       tcp_write_all("CONNECT $dest_serv:$port HTTP/1.0$proxyauth$CRLF$CRLF");
+    return wantarray ? (0,$errs) : 0 if $errs;
+    ($line, $errs) = tcp_read_until($CRLF . $CRLF, 1024);
+    warn "Proxy response: $line" if $trace>2;
+    return wantarray ? (0,$errs) : 0 if $errs;
+    return wantarray ? (1,'') : 1;  # Success
+}
+
+# end of Net::SSLeay::open_proxy_tcp_connection
+1;