local host, port = "meteo.ulgrad.ru", 4999 local socket = require("socket") local tcp = assert(socket.tcp()) tcp:connect(host, port); --note the newline below tcp:send("thunder!"); while true do local s, status, partial = tcp:receive() print(s or partial) print(status) if status == "closed" then break end end tcp:close()