SRS::EPP::Proxy::Listener - socket factory class
my $listener = SRS::EPP::Proxy::Listener->new( listen => [ "hostname:port", "address:port" ], ); # this does the listen part $listener->init; # this normally blocks, and returns a socket. # it might return undef, if you pass it a timeout. my $socket = $listener->accept;
This class is a TCP/IP listener. It listens on the configured ports for TCP connections and returns sockets when there are incoming connections waiting.
You don't actually need to supply the port or listen addresses; the defaults are to listen on INADDR_ANY (0.0.0.0) or IN6ADDR_ANY (::) on port epp(700).
epp(700)
If the IO::Socket::INET6 module is installed, then at load time the module tries to listen on a random port on the IPv6 loopback address. If that works (or fails with a particular plausible error, if something else happened to be using that port), then IPv6 is considered to be available. This means that the RFC3493-style getaddrinfo and such are used instead of gethostbyname. You will end up with a socket for every distinct address returned by getaddrinfo on the passed-in list.
gethostbyname
getaddrinfo
IPv6 addresses (not names) must be passed in square brackets, such as [2404:130:0::42].
[2404:130:0::42]
In general these rules should make this listener behave like any normal IPv6-aware daemon.
IO::Socket::INET, Socket6, IO::Socket::INET6
Development commissioned by NZ Registry Services, and carried out by Catalyst IT - http://www.catalyst.net.nz/
Copyright 2009, 2010, NZ Registry Services. This module is licensed under the Artistic License v2.0, which permits relicensing under other Free Software licenses.
To install SRS::EPP::Proxy, copy and paste the appropriate command in to your terminal.
cpanm
cpanm SRS::EPP::Proxy
CPAN shell
perl -MCPAN -e shell install SRS::EPP::Proxy
For more information on module installation, please visit the detailed CPAN module installation guide.