[Interest] QTcpSocket::connectToHost very slow with IPv6

Etienne Sandré-Chardonnal etienne.sandre at m4x.org
Thu Feb 12 19:59:33 CET 2015


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.

Thanks,

Etienne
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.qt-project.org/pipermail/interest/attachments/20150212/7777296a/attachment.html>


More information about the Interest mailing list