D
Dirk Bruere at NeoPax
Got a bug somewhere...
Is this bit of code going to cause problems ie the bit running in the
loop? I find that the code never exits ds.receive(incoming)
try
{
DatagramSocket ds = new DatagramSocket(Constants.LOCAL_PORT);
DatagramPacket incoming = new DatagramPacket(receiveBuffer,
receiveBuffer.length);
incoming.setLength(60000);
while(true) //Run this as an endless loop
{
ds.receive(incoming);
packetStr = new String(receiveBuffer, 0, incoming.getLength(),
"UTF-8");
if (packetStr != null) BlinkAPI.update(packetStr);
}
} catch (IOException e1) {}
Is this bit of code going to cause problems ie the bit running in the
loop? I find that the code never exits ds.receive(incoming)
try
{
DatagramSocket ds = new DatagramSocket(Constants.LOCAL_PORT);
DatagramPacket incoming = new DatagramPacket(receiveBuffer,
receiveBuffer.length);
incoming.setLength(60000);
while(true) //Run this as an endless loop
{
ds.receive(incoming);
packetStr = new String(receiveBuffer, 0, incoming.getLength(),
"UTF-8");
if (packetStr != null) BlinkAPI.update(packetStr);
}
} catch (IOException e1) {}