1 2 3 4 5 6 7 8 9
local str = "Lua echo server opening / " .. os.date("%T") while str and str ~= "" and str ~= "\r" do io.write(str, "\r\n") io.flush() str = io.read() end io.write("Lua echo server closing / " .. os.date("%T"), "\r\n")