I use Android 1.5 on HTC Hero

My code (udp server on my phone) :

this.socket = new DatagramSocket(port);
byte[] array = new byte[500];
DatagramPacket packetIn = new DatagramPacket(array,500);
this.socket.receive(packetIn);
System.out.println("packet length " + packetIn.getLength());

Packet length is ALWAYS "1", even if i send larger packets !
I don't understand why ...

When i use Wireshark, i see "normal" packets.

Is it a bug ?
This code works on Windows.

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Reply via email to