box.cfg{} socket = require('socket') socket.tcp_server('0.0.0.0', 3302, { handler = function(s) while true do local request request = s:read("\n"); if request == "" or request == nil then break end print(request) end end, prepare = function() print('Initialized') end } )
socket = require('socket')
socket.tcp_server('0.0.0.0', 3302,
{
handler = function(s)
while true do
local request
request = s:read("\n");
if request == "" or request == nil then
break
end
print(request)
end
end,
prepare = function()
print('Initialized')
end
}
)