I have a strange problem.
This code suddenly stopped working since 0.9.4:
function sendData()
sk=net.createConnection(net.TCP, 0)
sk:on("receive", function(sck, c) print(c) end )
sk:connect(8888, "192.168.11.1")
sk:send("asdf jklo asa ads das")
sk:close()
end
sendData()
When I am writing each line one-by-one, after the sk:close() the packet is sent.
However, when I call the function and do it quickly, the packet is not sent.
I cannot even receive an event on("connection", ...).
The same code worked with 0.9.2, the data within sk:send were transmitted imediatelly and I could use on("sent", ...) statement to close the connection.
Can anyone advice what am I doing wrong?
Thanks.