title: node.js: Send raw data of Uint32Array
body: <p>The following node.js code converts a string to Uint32 array.
  But when I tried to send the array I got:</p>
  <p>ERR_INVALID_ARG_TYPE</p>
  <p>Can you tell why ?</p>
  <p>When I tried to send:
  Buffer.from(arr32).buffer</p>
  <p>I got only the LSByte in each 32 bits word.</p>
  <p>Thank you,
  Zvika</p>
  <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
  <div class="snippet-code">
  <pre class="snippet-code-js lang-js prettyprint-override"><code>function tcpConnect ()
  {
      // Send a connection request to the server.
      client.connect({
          host:'localhost',
          port:5100
        });
  
      client.on('connect',function(){
          console.log('Client: connection established with server');
          
      });
  
      client.on ('close', ()=&gt;{
          console.log ("TCP close");
          setReconnectInterval ();
      });
  
      client.on ('error', function () {
          console.log ("TCP error");
      });
  }
  
   tcpConnect ();
   let data = "3405655469, 7, 1036, 0, 1, 2,...,255";
   let arr = data.split (',');
   var arr32 = new Uint32Array(arr);
  
   client.write (arr32);</code></pre>
  </div>
  </div>
  </p>