1 socket
= require("socket");
2 host
= host
or "localhost";
4 server
= assert(socket
.bind(host
, port
));
7 print("server: waiting for client connection...");
8 control
= assert(server
:accept());
10 command
, emsg
= control
:receive();
11 if emsg
== "closed" then
16 assert(control
:send(ack
));
18 ((loadstring
or load
)(command
))();