[Qt-interest] QTcpSocket.
Bradley T. Hughes
bradley.hughes at nokia.com
Mon Mar 2 14:32:41 CET 2009
Shabd Swarup V wrote:
> Hi Bradley,
>
> Thanks a lot for the inputs. Although, being new with Qt, I'm not sure
> if I fully understand some of your suggestions as regards NOT
> subclassing QThread.
Then I would recommend that you don't use QThread at all, just stick QTcpSocket.
> Can you be kind enough and send code for socket communication, without
> using threads. I have no requirement as such that I MUST use threads.
> The purpose is to get the data asynchronously.
You're in luck :) Qt has many examples of how to do this, readily documented at:
http://doc.trolltech.com/4.4/examples.html#network
These examples (and documentation) are included in the Qt package as well,
so you can easily compile, modify, and test them yourself.
Good luck! :)
--
Bradley T. Hughes (Nokia-D-Qt/Oslo), bradley.hughes at nokia.com
Sandakervn. 116, P.O. Box 4332 Nydalen, 0402 Oslo, Norway
More information about the Qt-interest-old
mailing list