[SOLVED] TCP Communication
I have a very basic question. After I set up my server and have connected to a client do I have to continuously (synchronously) poll for data from my client or does Qt know that when there is data to send a signal that I can then call client->read() from? If I don't have to keep polling for data then I dont want to waste processing power doing so.
QTcpSocket does send a "readyRead":http://qt-project.org/doc/qt-5/qiodevice.html#readyRead signal when something has been received.
Probably the best for you is to checkout the "fortune server":http://qt-project.org/doc/qt-5/qtnetwork-fortuneserver-example.html and "client":http://qt-project.org/doc/qt-5/qtnetwork-fortuneclient-example.html examples.