View on
MetaCPAN is shutting down
For details read Perl NOC. After June 25th this page will redirect to
Andrew Chilton > SRS-EPP-Proxy-0.21 > SRS::EPP::Proxy::Listener



Annotate this POD


Open  1
View/Report Bugs
Source   Latest Release: SRS-EPP-Proxy-0.22


SRS::EPP::Proxy::Listener - socket factory class


 my $listener = SRS::EPP::Proxy::Listener->new(
     listen => [ "hostname:port", "address:port" ],

 # this does the listen part

 # 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 ( or IN6ADDR_ANY (::) on port 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.

IPv6 addresses (not names) must be passed in square brackets, such as [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 -

Copyright 2009, 2010, NZ Registry Services. This module is licensed under the Artistic License v2.0, which permits relicensing under other Free Software licenses.

syntax highlighting: