[Interest] QTcpSocket::connectToHost very slow with IPv6
Thiago Macieira
thiago.macieira at intel.com
Fri Feb 13 03:02:21 CET 2015
On Thursday 12 February 2015 12:33:50 Thiago Macieira wrote:
> On Thursday 12 February 2015 19:59:33 Etienne Sandré-Chardonnal wrote:
> > Dear all,
> >
> > I have a client/server app written fully in Qt 4.8.5, running under
> > Windows
> > 7 64bit
> >
> > When the client tries to connect to the server over a local ethernet
> > network in the same room.
> >
> > QTcpSocket::connectToHost returns almost immediately when using the IPv4
> > host address, while it takes nearly 22s with the IPv6 address. In both
> > cases, the connection is successful and the communication works flawlessly
> > (and fast).
> > Also, if the client disconnects and reconnects, it's now very fast in both
> > protocols. Only the first time is slow for IPv6
> >
> > What can be the reason for this? I googled this without much success.
>
> Can you check the traffic sniffing for this? Is the initial TCP/IPv6 SYN
> packet sent quickly? Or, instead, is the initiating host sending ICMPv6
> Neighbour Discovery packets trying to locate the destination on the
> network?
Did you connectToHost to an IPv6 address or to a hostname that resolves to
IPv6? If the latter, can you check if it's sending DNS requests that simply
take long to reply? There are quite a few broken DNS servers out there that
don't repond properly to AAAA queries.
--
Thiago Macieira - thiago.macieira (AT) intel.com
Software Architect - Intel Open Source Technology Center
More information about the Interest
mailing list