TcpServer, improve IPv6 support, by Michael Holzt

This commit is contained in:
Matt Simerson 2012-11-14 17:15:08 -05:00
parent b8baa4b91b
commit 61f7ea00e0
3 changed files with 1 additions and 9 deletions

View File

@ -14,7 +14,7 @@ if (
# INET6 prior to 2.01 will not work; sorry. # INET6 prior to 2.01 will not work; sorry.
eval {require IO::Socket::INET6; IO::Socket::INET6->VERSION("2.00");} eval {require IO::Socket::INET6; IO::Socket::INET6->VERSION("2.00");}
) { ) {
import Socket6; Socket6->import(qw(inet_ntop));
$has_ipv6=1; $has_ipv6=1;
} }

View File

@ -20,10 +20,6 @@ $| = 1;
my $has_ipv6 = Qpsmtpd::TcpServer::has_ipv6; my $has_ipv6 = Qpsmtpd::TcpServer::has_ipv6;
if ($has_ipv6) {
eval 'use Socket6';
}
# Configuration # Configuration
my $MAXCONN = 15; # max simultaneous connections my $MAXCONN = 15; # max simultaneous connections
my @PORT; # port number(s) my @PORT; # port number(s)

View File

@ -31,10 +31,6 @@ defined $Config{sig_name} || die "No signals?";
my $has_ipv6 = Qpsmtpd::TcpServer::has_ipv6; my $has_ipv6 = Qpsmtpd::TcpServer::has_ipv6;
if ($has_ipv6) {
use Socket6;
}
#use Time::HiRes qw(gettimeofday tv_interval); #use Time::HiRes qw(gettimeofday tv_interval);
#get available signals #get available signals