I am trying to send a packet using UDP. I know that if the channel is not free the packet will not be sent. I am using QT’s udpSocket->writeDatagram to send a UDP packet. I am doing it in a loop, I want to make sure I do not send another packet before the previous packet has been sent. Is there a flag, or any other way that I can check and make sure the packet is sent?
I am trying to send a packet using UDP. I know that if the
Share
The docs say:
So if it returns something other than
-1you can consider it “sent”. However, if what you really want to know is whether it made it to the other side, you’ll want to hear from the peer.