AnyEvent-HTTP-Socks

 view release on metacpan or  search on metacpan

t/1_nb.t  view on Meta::CPAN

#!/usr/bin/env perl

use Test::More;
use strict;
use IO::Socket::Socks qw/:constants $SOCKS_ERROR/;
BEGIN { 
	if( $^O eq 'MSWin32' ) {
		plan skip_all => 'Fork + Windows = Fail';
	}
	
	$ENV{http_proxy} = $ENV{HTTP_PROXY} = 
	$ENV{https_proxy} = $ENV{HTTPS_PROXY} = 
	$ENV{all_proxy} = $ENV{ALL_PROXY} = undef;
	
	use_ok('AnyEvent::HTTP::Socks');
};

$AnyEvent::HTTP::MAX_PER_HOST = 10;

my ($h_pid, $h_host, $h_port) = make_http_server();
my ($s1_pid, $s1_host, $s1_port) = make_socks_server(4, undef, undef, accept => 1, reply => 2);



( run in 0.341 second using v1.01-cache-2.11-cpan-d7a12ab2c7f )