Back to Blog home

IPv6 changes in Qt5

Published on Tuesday July 05, 2011 by Markus Goetz in Internet QtWebKit Symbian | Comments

As you might know, Qt has had support for IPv6 since quite some time.
Now we have made some changes in Qt5 that relate to IPv6:

Shane has improved the support for binding TCP and UDP sockets. Originally there was QHostAddress::Any which meant any IPv4 (0.0.0.0). Then at some point QHostAddress::AnyIPv6 was introduced to mean any IPv6. We changed this a bit: Now QHostAddress::Any means any IPv4/IPv6 and there is a new enum QHostAddress::AnyIPv4 that stands for 0.0.0.0.

Martin has implemented a variant of the "Happy Eyeballs" IPv6 connection mechanism inside QNetworkAccessManager's HTTP code.
This is a temporary measure that we'll use for connecting to web servers. If the OS indicates support for both IPv4 and IPv6 and has connectivity for both, we will try to connect with IPv4 and IPv6 if we get both types of DNS records for this HTTP server.
Whichever address family connects first will then be used for all further connections to this server. The goal here is to deal with the possibility that IPv6/IPv4 packets get eaten up somewhere and we'd have timeouts and a bad user experience because of that.

To further express that we take IPv6 seriously, I also have removed the support to compile with QT_NO_IPV6. I think that every platform that Qt5 will run on also has support for IPv6.

We also haven't forgotten the 4.8 branch. It will bring IPv6 support for Qt/Symbian. Stay tuned for that, I heard there should be a beta real soon now.

Subscribe to Our Blog

Stay up to date with the latest marketing, sales and service tips and news.

We are updating our comment system and you could face some issues. Please write to us at feedback@qt.io to report issues/bugs.