Hi,

I have a problem when I am trying to receive a datagram on localhost.
I have a simple client that just sends datagram:
Code:
DatagramConnection dgc = (DatagramConnection) Connector.open("datagram://localhost:5000");
byte[] payload = "Hello World!".getBytes();
Datagram datagram = dgc.newDatagram(payload, payload.length);
dgc.send(datagram);
And I have push registry application that starts when I receive a new udp packet on port 5000:
Code:
DatagramConnection dgc = (DatagramConnection) Connector.open(connections[0]);
Datagram datagram  = dgc.newDatagram(dconn.getMaximumLength());
dconn.receive(datagram);
form.append(new String(datagram.getData()));
It starts fine whenever I sent datagram from my first application but it always prints "null" instead of "Hello Word!" that I sent.
Does anyone know what the problem could be?
Thanks.