On Fri, Dec 20, 2013 at 5:53 PM, Stefan Adams
<ste...@cogentinnovators.com>wrote:

> Is it possible to listen on the same port number on both the IPv4 address
> and the IPv6 address?
>

# env MOJO_LOG_LEVEL=debug MOJO_LISTEN=http://[2001:1890:1221:800::61]*:80*,
http://12.110.226.61*:80* perl -Mojo -E
'a("/"=>sub{$_->app->log->debug("Remote Address: ".$_->tx->remote_address);
$_->render(text=>$_->tx->remote_address."\n")})->start' daemon

Only IPv6 connections will connect on port 80.
$ curl ipv6.cogent-it.com
2001:470:7b:1e5::2
$ curl 12.110.226.61
curl: (7) couldn't connect to host

# env MOJO_LOG_LEVEL=debug MOJO_LISTEN=http://[2001:1890:1221:800::61]*:80*,
http://12.110.226.61*:81* perl -Mojo -E
'a("/"=>sub{$_->app->log->debug("Remote Address: ".$_->tx->remote_address);
$_->render(text=>$_->tx->remote_address."\n")})->start' daemon

IPv6 connections will connect on port 80 and IPv4 connections will connect
on port 81.
$ curl ipv6.cogent-it.com  # 2001:1890:1221:800::61 (It seems curl won't
connect to IPv6 IP addresses??)
2001:470:7b:1e5::2
$ curl 12.110.226.61:81
24.107.112.178

Is it possible for one Mojolicious process to listen on port 80 for both
the IPv6 address as well as the IPv4 address?  I can SSH to the box on both
the IPv6 address as well as the IPv4 address...  Why can't I do the same
with an HTTP connection?

-- 
You received this message because you are subscribed to the Google Groups 
"Mojolicious" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to mojolicious+unsubscr...@googlegroups.com.
To post to this group, send email to mojolicious@googlegroups.com.
Visit this group at http://groups.google.com/group/mojolicious.
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to