As the title says... Chat on...

User avatar
By RogerF
#43101 Hello: I am trying to learn how to use Lua on my ESP8266 Development Board. I am studying a sample Lua program that has statements beginning in the following way:

conn=net.createConnection(net.TCP, 0)
conn:on("connection",function(conn, payload).........................
conn:send("HEAD / HTTP/1.1\r\n"...........................................
conn:on("receive", function(conn, payload)...............
conn:close()

I do not understand what these statements are doing and I cannot find any documentation on :on, :send, or :close. Can anyone direct me to webpages or explanations of what these statements do? Thanks in advance for any suggestions.

(If I should ask this question elsewhere, please direct me to a more appropriate forum.)