[android-developers] DatagramSocket and Receive

2009-12-08 Thread fala70
I am working with UDP and DatagramSocket. I verified that the Receive function clear all data more of setLength of DatagramPacket. My packets have a variable len. I use first two bytes to understand the len packet. public void run() { byte []buff = new byte[1024]; } private int

[android-developers] DatagramSocket and Receive

2009-12-08 Thread fala70
I am working with UDP and DatagramSocket. I verified that the Receive function clear all data more of setLength of DatagramPacket. My packets have a variable len. I use first two bytes to understand the len packet. This is my code: public void run() { byte []buff = new byte[1024];