Home > Back-end >  UDP communication receive data for the first time will have a long time delay problem
UDP communication receive data for the first time will have a long time delay problem

Time:12-19

Post for help for the first time a great god, and for each great spirit action, please!!!!!!
Question is like this, I use the UDP communication, the sender periodic (1.2 seconds) to send data to the receiving end, the sender to start sending data, the receiver before receiving the data for the first time there will be a few seconds delay, and for the first time the received data is sent tens of seconds for each cycle of all data, normal for the first time to receive the data returned to normal after the receiving end according to the cycle of receiving data, like where data is blocked, such as the amount of accumulated to a certain made jam, after open, someone encountered this problem? How to solve?

CodePudding user response:

Encounter with, the building Lord solved

CodePudding user response:

If it's me, keep process 7 * 24 hours a day every such as 10 seconds to send and receive a heartbeat packet!

CodePudding user response:

Before sending the connect?
The connect of UDP programming

CodePudding user response:

Caught see if the packet is reached, if not to see if the problem of routing, to see if the recv code efficiency is bad

CodePudding user response:

Perhaps can have a try, open the receiver first, and then we will start sending end
  • Related