Test script:
cnt=0
sv=net.createServer(net.TCP)
sv:listen(80,function(c)
c:on("receive", function(c, pl)
c:send("<h1>hello world</h1>")
print("sending hello " .. cnt)
cnt=cnt+1
end)
c:on("sent", function(conn)
conn:close()
end)
end)
I open url http://192.168.1.72
In the esplorer terminal I see that the "receive" event is called twice every time and in the console I see:
sending hello 0
sending hello 1Is this normal behaviour?