I am very new to this but have made some progress. However I am failing now on a (i think) simple problem:
I have a TCP Server which send a CHAR every second to the ESP8266 over TCP. The ESP8266 is loaded with to echo the CHAR back:
sen=0
clien=net.createConnection(net.TCP,0)
clien:connect(1234,"192.168.2.10")
clien:on("receive",function(clien,pl) if sen==0 then sen=1 clien:send(pl) end end)
clien:on("sent",function() sen=0 end)
This script works for about 15s then stops.
What am I doing wrong? Pls help!
Thank you!