title: Telnet server example
body: <p>Today I installed NodeMCU on one ESP8266 module.</p>
  
  <p>I made a simple telnet server (logging in to the AP is already done and connected)</p>
  
  <pre><code>srv=net.createServer(net.TCP,7200)
  srv:listen(23,function(conn)
  
      conn:on("receive", function(conn,telnetdata)
          print(telnetdata)
  
          conn:send("Got it\r\n")
      end)
  
      conn:on("sent",function(conn)
  
          print("[Sent]");
          --conn:close();
          --collectgarbage();
      end)
  
  end)
  </code></pre>
  
  <p>I can telnet into the ESP8266 using Putty and I can send static data back to Putty (<code>conn:send("Got it\r\n")</code>).</p>
  
  <p>What I want to do is to send data to Putty from the esp serial port (UART). I've googled for an example without success. BTW I'm using ESPlorer to program the ESP and to send data back to putty.</p>
  
  <p>Instead of using <code>conn:send("Got it\r\n")</code> I want to dynamically type the response. I've tried <code>uart:on</code> callback but I haven't fully understood how it works.</p>