udp-header
UDP header serialization.
Example
var UdpHeader = ; // parse UDP headers invar udph = inputBuf inputOffset;udphsrcPort === 52;udphdstPort === 5432;udphdataLength === 500;udphtotalLength === 508;udphlength === 8; // write UDP headers outvar out = udph; // By default, the UDP checksum is not calculated. It is passed through from// if you parse an existing buffer or set to the opts.checksum constructor// option.//// To calculate the checksum you must call setChecksum() with the ip header// object and udp payload buffer.// the src IP, dst IP, and data buffer.var iph = dst:'1.1.1.1' src:'2.2.2.2';udph; // To write a buffer in place, provide the buffer and option offset// after the packet object.udph;