Important: Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct
QTcpSocket with signal capability
hpng last edited by
I like to know if there is a way for QTcpSocket to automatically (i.e. not polling it
periodically using bytesAvailable() member function )
sends a signal when it has receive data from remote host.
So, I am looking for a signal function in QTcpSocket.
I did not see any documentation on signals emitted (when its buffer has data) by QTcpSocket.
I may have miss one. if there is any.
Franzk last edited by
You should be able to connect to the readyRead() signal. It might originate from QIODevice, which means you don't see it in the QTcpSocket documentation.
QTcpSocket is a QAbstractSocket which is a QIODevice which has a "readyRead() signal":http://doc.qt.nokia.com/latest/qiodevice.html#readyRead.
andre last edited by
As a general rule: if you find that some method, signal, property... that you think should obviously be in a class isn't in the documentation for that class, you should either browse the documentation of the superclasses, or just click the "List of all members, including inherited members" link. There is a good chance you'll find what you are looking for in (abstract) base class.