view test/testsrvr.lua @ 4:f0a27ccb1193 tip

Added ignore file
author Eric Wing <ewing . public |-at-| gmail . com>
date Sat, 30 Aug 2008 08:46:39 -0700
parents 4b915342e2a8
children
line wrap: on
line source

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