title: how to play dgram audio message in nodejs
body: <p>Excuse me if I do not speak good English
  I record my voice on the phone and send live server (with dgram socket)
  And the following code,  I transmit it to all users on a server
  I wanted to see what a user can receive and broadcast sound in Html page</p>
  
  <pre><code>var http = require('http');
  var dgram = require('dgram');
  var clients = [];
  
  var server = http.createServer(function(req, res) {
      res.writeHead(200,{"Content-Type": "audio/mpeg", 'Transfer-Encoding': 'chunked'});
          clients.push(res);
          console.log('Client connected; streaming');
      }).listen(8080, function() {
          console.log('Listening at: 127.0.0.1 8080');
      }
  );
  
  var srv = dgram.createSocket("udp4");
  srv.on("message", function (msg, rinfo) {
          if (clients.length &gt; 0){
              for (client in clients){
                  clients[client].write(msg);
              };
          } 
  });
  
  srv.on("listening", function () {
    var address = srv.address();
    console.log("server listening " + address.address + ":" + address.port);
  });
  
  srv.bind(50005);
  </code></pre>
  
  <p>and i send recorded data to the server with following java code in android :</p>
  
  <pre><code>                    DatagramSocket socket = new DatagramSocket();
                      byte[] buffer = new byte[minBufSize];
                      DatagramPacket packet;
                      final InetAddress destination = InetAddress.getByName("my server ip");
                      AudioRecord recorder = new AudioRecord(MediaRecorder.AudioSource.MIC,sampleRate,channelConfig,audioFormat,minBufSize*10);
                      recorder.startRecording();
  
                      while(status == true) {
  
                          minBufSize = recorder.read(buffer, 0, buffer.length);
                          packet = new DatagramPacket (buffer,buffer.length,destination,port);
                          socket.send(packet);
                      }
  </code></pre>
  
  <p>please help me ...</p>