blob: f1972c2273c569b114f4ce781a3dc22de78c0c88 [file] [log] [blame]
socket = require("socket");
host = host or "localhost";
port = port or "8383";
server = assert(socket.bind(host, port));
ack = "\n";
while 1 do
print("server: waiting for client connection...");
control = assert(server:accept());
while 1 do
command = assert(control:receive());
assert(control:send(ack));
print(command);
(loadstring(command))();
end
end