[Interest] QTcpSocket::connectToHost very slow with IPv6

Thiago Macieira thiago.macieira at intel.com
Thu Feb 12 21:33:50 CET 2015


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?

Or instead is the network idle for 22 s?

Does this happen with non-Qt applications, like ping6 or telnet?

-- 
Thiago Macieira - thiago.macieira (AT) intel.com
  Software Architect - Intel Open Source Technology Center




More information about the Interest mailing list