Why Qt is great for networking

Dave Smith dave at thesmithfam.org
Thu Nov 1 00:04:42 MDT 2007


Fortuitously, the topic came up this week about which languages/toolkits 
have served us best for network-related software development. On that 
vein, I'd like to share an experience I had yesterday with Qt's network 
library.

I've always liked Qt's network library. I've watched it mature over the 
last few years, and have been generally impressed. It's all non-blocking 
by deafult, so your app will stay responsive. It's got a clean API that 
lets you get to work on your problem without lots of network-related 
sit-ups.

Yesterday I decided to add SSL support to a network app, the server and 
client side of which I wrote in Qt. It's XML-RPC for the record. I was 
amazed at how easy it was. Using Qt 4.3.2's QSslSocket and its new 
SSL-enabled QHttp classes, it took about 2 hours. That includes allowing 
the user to specify their own key/cert files on the server side. I had 
never worked with SSL before, so I was very pleased at the development 
speed.

Previously, I added "deflate" compression support to the same app, using 
Qt's qCompress() and qUncompress(). Worked great, and it's standard HTTP 
(my client can interact with Python's XML-RPC server as well). That only 
took about an hour to do.

All told, I'm sold on Qt.

Just my $0.02 in case anyone wanted to know.

--Dave



More information about the PLUG mailing list