UDP packet loss
-
Hello,
I am using UDP protocol for file tx.(100MB) from one pc to other pc. Payload is 1450(no of byes I read from file). Every time when I am transferring the 100 MB,2300 byes are loss at receiving end. If I will change the payload size, my data loss at receiving pc will change.Any one has idea about it. How can I resolve it?
Thanks
Regards,
Mohit -
@Mohit-rai First, you should show your code, else other can only guess what can be wrong.
Why do you use UDP and not TCP? UDP does not guarantee that everything will arrive. -
@Mohit-rai said in UDP packet loss:
Hello,
I am using UDP protocol for file tx.(100MB) from one pc to other pc. Payload is 1450(no of byes I read from file). Every time when I am transferring the 100 MB,2300 byes are loss at receiving end. If I will change the payload size, my data loss at receiving pc will change.Any one has idea about it. How can I resolve it?
Thanks
Regards,
Mohithave you verified that your datagram's length in smaller than the UdpSocket-buffer of your receiving & sending socket ?
-
Can you try with file size of 10KB or 20KB ? Can you try with smaller payload size e.g read only 500 bytes of data and send it.
Pay attention for debugs. Many times people are doing the read debug also. reading it somewhere also. ie. same message is read twice. -
@Mohit-rai how did the issue go?. Are you able to solve this issue ? Do you still have the problem ?