Commit 0d3e0bbb authored by Tino Hager's avatar Tino Hager Committed by Marcel Stör
Browse files

Documentation Change - Memory leak (#1358)

Fixes #1303
parent b47a56de
...@@ -28,11 +28,11 @@ The NodeMCU programming model is similar to that of [Node.js](https://en.wikiped ...@@ -28,11 +28,11 @@ The NodeMCU programming model is similar to that of [Node.js](https://en.wikiped
-- a simple HTTP server -- a simple HTTP server
srv = net.createServer(net.TCP) srv = net.createServer(net.TCP)
srv:listen(80, function(conn) srv:listen(80, function(conn)
conn:on("receive", function(conn, payload) conn:on("receive", function(sck, payload)
print(payload) print(payload)
conn:send("<h1> Hello, NodeMCU.</h1>") sck:send("<h1> Hello, NodeMCU.</h1>")
end) end)
conn:on("sent", function(conn) conn:close() end) conn:on("sent", function(sck) sck:close() end)
end) end)
``` ```
```lua ```lua
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment