[Haskell-cafe] Binding a socket to all interfaces
michael at snoyman.com
Wed Sep 21 06:38:14 CEST 2011
One of the recurring issues that comes up in Warp is binding to IPv4
versus IPv6 hosts. Our current code is available at . It was
updated to look like that in this commit  in order to support both
IPv4 and IPv6 hosts by default. However, now it seems than on Debian
and FreeBSD, it *only* responds to IPv6 by default. I'm frankly
stumped at this point on how to have our cake and eat it too.
Does anyone have an idea of the correct incantation to get Warp to do
the Right Thing(tm) here? And if not, is there any advice on sensible
default behavior? I'm considering allowing a few special host values:
* "*" (default, what we have now): Make this bind to IPv4
* "ipv4": Again, bind to IPv4. Guaranteed not to change in the future
* "ipv6": Bind to IPv6.
More information about the Haskell-Cafe