Skip to content Skip to sidebar Skip to footer

Android Udp Packets Loss

I am facing weird problem in receiving udp packets on Sony Xperia Z tablet. My application didn't receive many udp packets. So I have rooted the tablet to install the shark app and

Solution 1:

I'd tell you a UDP joke, but you might not get it.

Packet loss is a documented feature of the UDP protocol.

UDP protocol does not guarantee that the package will be delivered to the addressee. http://en.wikipedia.org/wiki/User_Datagram_Protocol

Solution 2:

I have found why my app missed some packets received by device. I have set datagram socket receiver buffer size to small value. I removed this code setting buffer size and then it strated receving all the packets. By default, android sets buffer size as 163840B but I set the size to 64 bytes. It is working fine with default buffer size set by android.

Post a Comment for "Android Udp Packets Loss"