[Interest] Interest Digest, Vol 18, Issue 62

Etienne Sandré-Chardonnal etienne.sandre at m4x.org
Sat Mar 23 15:40:47 CET 2013


Hi Thiago,

What you said is contradictory with both the doc from Qt 4.8 (see
http://qt-project.org/doc/qt-4.8/qhostaddress.html) and with my tests.
Using QHostAddress::Any, my server does not listen to IPv6 (tested
with both my client app and with netcat) while it does with AnyIPv6
(it worked again with both my client app and netcat)

I'm under Windows 7, but again the Qt 4.8 doc clearly states that
"Any" is only IPv4 and "AnyIPv6" is only IPv6

Etienne


> Date: Fri, 22 Mar 2013 17:13:30 -0700
> From: Thiago Macieira <thiago.macieira at intel.com>
> Subject: Re: [Interest] IPV6 not working
> To: interest at qt-project.org
> Message-ID: <2170062.xE9WyL76lm at tjmaciei-mobl2>
> Content-Type: text/plain; charset="iso-8859-1"
>
> On sexta-feira, 22 de mar?o de 2013 23.34.51, Etienne Sandr?-Chardonnal wrote:
>> I got it... In fact, I just learned that it's not possible to listen
>> on both IPv4 and IPv6 with the same socket, and that QHostAddress::Any
>> means only IPv4
>
> That's incorrect. QHostAddress::Any listens on both address families on any
> modern OS. It breaks only on Windows XP because the IPv6 stack there is an
> add-on, not built-in. Then again, no one runs that connected to the Internet
> (right?) and definitely no one seriously uses that for IPv6.
>
> QHostAddress::AnyIPv4 listens only on IPv4.
>
>> Qt automatically uses the IPv6 when the DNS lookup returns both IPv4
>> and IPv6, which caused the issue.
>>
>> How is it done usually in server applications? Are there always two
>> QTcpServers , one for IPv4 and one for IPv6?
>
> See above.



More information about the Interest mailing list