title: node js Buffer add NULL terminated message
body: <p>First try with node js and Tcp sockets.</p>
  
  <p>for a valid request, I need to send a message with XML to the server that needs to be terminated with null (0x00).</p>
  
  <p>So far i came up with the code below to send the message, but I don't know how to add the NULL terminator.</p>
  
  <pre><code>const client = new net.Socket();
  
  client.connect(port, address, () =&gt; {
   attachments.forEach((attachment) =&gt; {
      const request = setValueToXml(attachment);
      const buffer = new Buffer(request);
      client.write(buffer); // &lt;-- What do I need to add here?
    });
  });
  client.on('data', (resp) =&gt; {
    console.log('You have mail', resp);
  });
  </code></pre>