readyRead() with multiple streams

  • Hi,
    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?

    Thanks, Bernard

  • Moderators

    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).

Log in to reply

Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.