title: How can i send data from a UDP server to a browser?
body: <p>I try to make an application that receives from a third part application UDP packets.</p>
  
  <p>I try to create a server UDP in NodeJS, but now when I receive the data I don't know how can I show it in a browser windows.</p>
  
  <p>I explain better...my application receives data via udp in real time, the server processes them and should show them real time on a web page.</p>
  
  <p>This is my code for UDP server in NodeJS:</p>
  
  <pre><code>const dgram = require('dgram');
  const server = dgram.createSocket('udp4');
  
  server.on('error', (err) =&gt; {
  console.log(`server error:\n${err.stack}`);
  server.close();
  });
  
  server.on('message', (msg, rinfo) =&gt; {
  console.log(`server got: ${msg} from ${rinfo.address}:${rinfo.port}`);
  console.log(` messaggio ricevuto ${msg}`);
  
  });
  
  server.on('listening', () =&gt; {
  const address = server.address();
  console.log(`server listening ${address.address}:${address.port}`);
  
  });
  
  server.bind({
  adress:'127.0.0.1',
  port:'41234'
  });
  
  
  // server listening address :41234
  </code></pre>
  
  <p>Thanks a lot for the reply</p>