title: Connecting NodeMCU Lua socket client with node.js socket.io server
body: <p>I want to connect a NodeMCU Lua socket client to node.js socket.io server.</p>
  
  <p><strong>NodeMCU Lua code:</strong></p>
  
  <pre><code>sk = net.createConnection(net.TCP, 0)
  sk:on("receive", function ( sck,c )
      print (c)
  end)
  
  sk:on("connection", function ( sck,c )
      print("Connected")
      sk:send("Helloooo...")
  end)
  sk:connect(12346,"192.168.1.100")
  </code></pre>
  
  <p><strong>Node.js server code:</strong></p>
  
  <pre><code>var express = require('express');
  var app = express();
  var server = require('http').Server(app);
  var io = require('socket.io')(server);
  io.on('connection', function(socket){
      console.log('someone is connected');
  });
  server.listen(12346);
  </code></pre>
  
  <p><strong>The problem:</strong></p>
  
  <p>The on connection event in the Lua client is fired and prints "Connected", but the on connection event in node.js socket.io server isn't fired. I tried the Lua client with a Python socket server and it worked well! And I also tried a node.js socket server with a Javascript socket client and it worked well!</p>
  
  <p>Are there compatibility problems between NodeMCU and socket.io?</p>