Ricky Casavecchia
Ricky Casavecchia

Reputation: 650

Android UDP packet loss

So i'm writing an app that sends 5Kb packets out 15 times a second through UDP. I understand I will lose some packets but I seem to be losing all my packets after the first couple seconds. Even if I slow it down to send the 5Kb packets out once every 10 seconds I will still lose them. What would cause this?

Upvotes: 1

Views: 1465

Answers (2)

user207421
user207421

Reputation: 311028

You'll be lucky to get any UDP datagram larger than about 1260 bytes at all. The generally accepted limit for UDP through routers is 534 bytes, which derives somehow from the IPv4 non-fragmentation minimum of 576 bytes.

Upvotes: 2

Deepak Bala
Deepak Bala

Reputation: 11185

It's not surprising that they are all dropped. A payload bigger than 512 bytes is unlikely to make it out of the network. It depends on the MTU of your router and how much bandwidth is allocated to UDP / internet traffic on the router.

Upvotes: 3

Related Questions