Important: Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct
readyRead() with multiple streams
OliverBJ01 last edited by
My code has two streams; one UDP and the other TCP.
The QUdpSocket emits readyRead() and so does the QTcpSocket when data is received.
How can I distinguish between data received from the different streams?
Can I change the name of readyRead() for one of the sockets?
You can use two different slots or use the same slot but check what the sender is (you get pointer to the sender calling sender() in the slot).