IO-Socket-INET6
view release on metacpan or search on metacpan
build_requires => {
'Test::More' => 0,
},
configure_requires => {
'Module::Build' => '0.36',
},
'license' => "perl",
create_makefile_pl => 'traditional',
meta_merge => {
resources => {
repository => "https://github.com/shlomif/perl-io-socket-inet6",
},
keywords => [
"deprecated", "inet6", "input", "internet",
"ipv6", "network", "networking", "output",
"socket", "sockets",
],
},
);
$build->create_build_script;
2003-07-24 Rafael Martinez Torres <rmartine@fdi.ucm.es>
* New Release INET6-1.28
* Makefile.PL includes prerequisites: (min.) Socket6 0.12
* Fix _get_addr in INET6.pm to use Socket6::getipnodebyname.
2003-06-24 Rafael Martinez Torres <rmartine@fdi.ucm.es>
* New Release INET6-1.27.
* t/io_sock_inet6.t: New file for 'make test'.
2003-06-14 Rafael Martinez Torres <rmartine@fdi.ucm.es>
* Patch from Masahito Omote <omote@debian.org>.
- Fix IPv6 address and port splitt bug.
- Fix _get_addr in INET6.pm to use Socket6::getaddrinfo.
2003-06-05 Rafael Martinez Torres <rmartine@fdi.ucm.es>
* Initial CPAN release.
"abstract" : "[ DEPRECATED!! ] Object interface for AF_INET/AF_INET6 domain sockets",
"author" : [
"<gbarr@pobox.com> and currently maintained by the Perl Porters.",
"Modified by Rafael Martinez Torres <rafael.martinez@novagnet.com> and",
"Modified further by Shlomi Fish <shlomif@iglu.org.il>, while disclaiming"
],
"dynamic_config" : 1,
"generated_by" : "Module::Build version 0.4231",
"keywords" : [
"deprecated",
"inet6",
"input",
"internet",
"ipv6",
"network",
"networking",
"output",
"socket",
"sockets"
],
"license" : [
"file" : "lib/IO/Socket/INET6.pm",
"version" : "2.73"
}
},
"release_status" : "stable",
"resources" : {
"license" : [
"http://dev.perl.org/licenses/"
],
"repository" : {
"url" : "https://github.com/shlomif/perl-io-socket-inet6"
}
},
"version" : "2.73",
"x_serialization_backend" : "JSON::PP version 4.06"
}
- 'Modified by Rafael Martinez Torres <rafael.martinez@novagnet.com> and'
- 'Modified further by Shlomi Fish <shlomif@iglu.org.il>, while disclaiming'
build_requires:
Test::More: '0'
configure_requires:
Module::Build: '0.36'
dynamic_config: 1
generated_by: 'Module::Build version 0.4231, CPAN::Meta::Converter version 2.150010'
keywords:
- deprecated
- inet6
- input
- internet
- ipv6
- network
- networking
- output
- socket
- sockets
license: perl
meta-spec:
Errno: '0'
Exporter: '0'
IO::Socket: '0'
Socket: '0'
Socket6: '0.12'
perl: '5.008'
strict: '0'
warnings: '0'
resources:
license: http://dev.perl.org/licenses/
repository: https://github.com/shlomif/perl-io-socket-inet6
version: '2.73'
x_serialization_backend: 'CPAN::Meta::YAML version 0.018'
t/io_multihomed6.t view on Meta::CPAN
use IO::Socket::INET6 ();
$| = 1;
print "1..8\n";
eval {
$SIG{ALRM} = sub { die; };
alarm 60;
};
# find out if the host prefers inet or inet6 by offering
# both and checking where it connects
my ($port,@srv);
for my $addr ( '127.0.0.1','::1' ) {
push @srv,
IO::Socket::INET6->new(
Listen => 2,
LocalAddr => $addr,
LocalPort => $port,
) or die "listen on $addr port $port: $!";
$port ||= $srv[-1]->sockport;
t/io_multihomed6.t view on Meta::CPAN
# connected to first, not second
my ($first,$second) = vec($vec,fileno($srv[0]),1) ? @srv[0,1]:@srv[1,0];
my $cl = $first->accept or die $!;
# listener should not work for next connect
# so it needs to try second
close($first);
# make sure established connection works
my $fam0 = ( $cl->sockdomain == AF_INET ) ? 'inet':'inet6';
print {$cl} "ok 2 # $fam0\n";
print $cl->getline(); # ok 3
# So we'll be sure ok 3 has already been printed.
print {$cl} "Move on, will ya!\n";
close($cl);
# ... ok 4 comes when client fails to connect to first
# wait for connect on second and make sure it works
$vec = '';
vec($vec,fileno($second),1) = 1;
if ( select($vec,undef,undef,5)) {
my $cl2 = $second->accept or die $!;
my $fam1 = ( $cl2->sockdomain == AF_INET ) ? 'inet':'inet6';
print {$cl2} "ok 5 # $fam1\n";
print $cl2->getline(); # ok 6
close($cl2);
# should be different families
print "not " if $fam0 eq $fam1;
print "ok 7\n";
}
waitpid($pid,0);
print "ok 8\n";
} elsif (defined $pid) {
close($_) for (@srv);
# should work because server is listening on inet and inet6
my $cl = IO::Socket::INET6->new(
PeerPort => $port,
PeerAddr => 'localhost',
Timeout => 5,
) or die "$@";
print $cl->getline(); # ok 2
print {$cl} "ok 3\n";
# So we'll be sure ok 3 has already been printed.
$cl->getline();
t/listen_port_only.t view on Meta::CPAN
#!/usr/bin/perl
use strict;
use warnings;
use IO::Socket::INET6;
use Test::More;
my ($server,$port);
# try to create inet6 listener on some port, w/o given
# LocalHost (should use :: then)
CREATE_SERVER:
for my $i (1 .. 100)
{
$port = int(rand(50000)+2000);
$server = IO::Socket::INET6->new(
LocalPort => $port,
Listen => 10,
);
if ($server)
{
last CREATE_SERVER;
}
}
if (!$server)
{
plan skip_all => "failed to create inet6 listener";
}
elsif ( $server->sockhost ne '::' )
{
plan skip_all => "not listening on ::, maybe inet6 not available";
}
else
{
plan tests => 1;
my $client = IO::Socket::INET6->new( "[::1]:$port" );
# TEST
ok($client, "Client was initialised - connected.");
}
( run in 0.391 second using v1.01-cache-2.11-cpan-3cd7ad12f66 )