How to send raw UDP data with Arduino 1.0

Hi everybody, until recently I've been using an older version of Arduino with SPI.h, Ethernet.h, and Udp.h in order to send UDP messages to the host computer. Now, Udp.h has apparently been replaced with EthernetUdp.h. The problem I have with this is that Udp.write() seems to interpret a 0 in my buffer as a terminator and cuts off the rest of the buffer. This wasn't the case with Udp.sendPacket() in the old library.

Does anyone have a quick solution before I start digging into in the library source? Thanks, Sukandar

The are a few variations of UDP.write(). If you specify a pointer, rather than a character, it will assume zero terminated string. To send zeros, you must specify the length of the buffer to be sent as the second parameter.

byte outBuf[16];

// This sends all 16 bytes, zeros and all

Thanks much, that did it.

Would be great to have this in the documentation at