Important: Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

Qudpsocket



  • Dear friends,

    I am sending udp socket data every 1 minute with timer after some time I will stop sending. how to avoid that stopping like tcp any keepalive option available .How to solve that problem



  • Since udp is connectionless there is no such thing as keepalive. It's not a session but discrete messages that may or may not be delivered. Writing to a udp socket should not block. If the datagram can be delivered, it will be. If not, then it should be thrown away by the lower layers.



  • @satyanarayana143

    I am sending udp socket data every 1 minute with timer after some time I will stop sending
    
    How to solve that problem
    

    not able to understand the problem statement here.
    You are sending data at interval 1 minutes and after some time you are stopping the data.
    what do you want to automate by keepalive?


  • Lifetime Qt Champion

    @satyanarayana143 said in Qudpsocket:

    I will stop sending

    Do you mean you do not want to stop sending but for some reason it stops?
    Then please show your code.
    keepalive does not make sense for connectionless protocalls like UDP as already stated and your problem is most probably in your code.


Log in to reply