srv:close(); srv:close(); srv=net.createServer(net.TCP); srv:listen(80,function(conn) conn:on("receive",function(conn,payload) ptop = string.sub(payload, 0, 20); if(string.match(ptop, "ledon")) then gpio.write(0, 0); else gpio.write(0, 1); end print(payload); conn:send("HTTP/1.0 200\r\n"); conn:send("content-type: text/html\r\n"); conn:send("\r\n"); conn:send("\n