File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -2,6 +2,7 @@ Revision history for HTTP-Daemon
22
33{{$NEXT}}
44 - In t/chunked.t, leave choosing IP address family to IO::Socket::IP (GH#42) (Shoichi Kaji)
5+ - Add "IPv6 SUPPORT" section to pod (GH#43) (Shoichi Kaji)
56
676.07 2020-05-19 19:19:53Z (TRIAL RELEASE)
78 - Prefer IP address for host in $d->url (GH#40) (Shoichi Kaji)
Original file line number Diff line number Diff line change @@ -620,6 +620,10 @@ listen on a socket for incoming requests. The C<HTTP::Daemon> is a
620620subclass of C<IO::Socket::IP > , so you can perform socket operations
621621directly on it too.
622622
623+ Please note that C<HTTP::Daemon > used to be a subclass of C<IO::Socket::INET > .
624+ To support IPv6, it switched the parent class to C<IO::Socket::IP > at version 6.05.
625+ See L</IPv6 SUPPORT> for details.
626+
623627The accept() method will return when a connection from a client is
624628available. The returned value will be an C<HTTP::Daemon::ClientConn >
625629object which is another C<IO::Socket::IP > subclass. Calling the
@@ -863,6 +867,19 @@ Return a reference to the corresponding C<HTTP::Daemon> object.
863867
864868=back
865869
870+ =head1 IPv6 SUPPORT
871+
872+ Since version 6.05, C<HTTP::Daemon > is a subclass of C<IO::Socket::IP >
873+ rather than C<IO::Socket::INET > , so that it supports IPv6.
874+
875+ For some reasons, you may want to force C<HTTP::Daemon > to listen on IPv4 addresses only.
876+ Then pass C<Family > argument to C<< HTTP::Daemon->new >>:
877+
878+ use HTTP::Daemon;
879+ use Socket 'AF_INET';
880+
881+ my $d = HTTP::Daemon->new(Family => AF_INET);
882+
866883=head1 SEE ALSO
867884
868885RFC 2616
You can’t perform that action at this time.
0 commit comments