sv=net.createServer(net.TCP, 30)
sv:listen(sport,function(c)
c:on("receive", function(c, pl)
url = "/something/received/"
print("now get " .. url)
url_get()
end)
end)
function url_get()
conn=net.createConnection(net.TCP, false)
conn:on("receive", function(conn, pl) print(pl) end)
conn:connect(dport,server)
conn:send(url .. "\r\n\r\n")
conn:close()
end
then i try it. I perfrom a get to the server at ESP8266 and in Esplorer i can see the:
"now get /something/received/"
but the execution of get_url() it's not made
but if i select the block inside the get_url() function, and send it with the "Block" button, it works
Why if i execute it by hand, the code is working and if is executed auto, doesn't works?


