aboutsummaryrefslogtreecommitdiff
path: root/test/utestsrvr.lua
diff options
context:
space:
mode:
Diffstat (limited to 'test/utestsrvr.lua')
-rw-r--r--test/utestsrvr.lua14
1 files changed, 7 insertions, 7 deletions
diff --git a/test/utestsrvr.lua b/test/utestsrvr.lua
index f7be196..a96b570 100644
--- a/test/utestsrvr.lua
+++ b/test/utestsrvr.lua
@@ -1,10 +1,10 @@
1require("socket"); 1socket=require("socket");
2os.remove("/tmp/luasocket") 2os.remove("/tmp/luasocket")
3socket = require("socket.unix"); 3socket.unix = require("socket.unix");
4host = "luasocket"; 4host = host or "luasocket";
5server = socket.unix() 5server = assert(socket.unix())
6print(server:bind(host)) 6assert(server:bind(host))
7print(server:listen(5)) 7assert(server:listen(5))
8ack = "\n"; 8ack = "\n";
9while 1 do 9while 1 do
10 print("server: waiting for client connection..."); 10 print("server: waiting for client connection...");
@@ -12,6 +12,6 @@ while 1 do
12 while 1 do 12 while 1 do
13 command = assert(control:receive()); 13 command = assert(control:receive());
14 assert(control:send(ack)); 14 assert(control:send(ack));
15 (loadstring(command))(); 15 ((loadstring or load)(command))();
16 end 16 end
17end 17end