title: How to send a UDP packet via dgram in Nodejs?
body: <p>I tried various versions of Nodejs' datagram socket module's send function:</p>
  
  <pre><code>var dgram = require('dgram');
  
  var client = dgram.createSocket('udp4');
  
  client.send('Hello World!',0, 12, 12000, '127.0.0.1', function(err, bytes) {});
  client.send('Hello2World!',0, 12, 12000, '127.0.0.1');
  client.send('Hello3World!',12000, '127.0.0.1');
  
  client.close();
  </code></pre>
  
  <p>My server does work with another client but not this one, none of the packets arrive.</p>
  
  <p><a href="https://nodejs.org/api/dgram.html#dgram_socket_send_msg_offset_length_port_address_callback" rel="noreferrer">Nodejs' dgram send documentation</a> says</p>
  
  <pre><code>socket.send(msg[, offset, length], port[, address][, callback])
  </code></pre>
  
  <p>Is my filling in the arguments have a problem or something else make it fail? In the server program I did use port 12000 and the loopback IP address.</p>