title: io.on is not a function
body: <p>I have this code working for receiving data from my Arduino but I will like to send data back  to my Arduino and get a response on my client page. I added a listening function but I keep getting <code>io.on is not a function</code> when I send data from my client page. </p>
  
  <p><strong>test.js</strong></p>
  
  <pre><code>io.listen(app.listen(3000)).on('connection', function (client) {
  
      // store client into array
      clients.push(client);
  
      // on disconnect
      client.on('disconnect', function() {
  
          // remove client from array
          clients.splice(clients.indexOf(client), 1);
  
  
      });
  
      // I added this to listen for event from my chart.JS
  
      io.on('connection', function(socket){
  
          socket.on('LED on', function (data) {
              console.log(data);
  
          });
          socket.on('LED off', function (data) {
              console.log(data);
  
          });
      });
  });
  </code></pre>