diff options
Diffstat (limited to 'test/utestsrvr.lua')
-rw-r--r-- | test/utestsrvr.lua | 14 |
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 @@ | |||
1 | require("socket"); | 1 | socket=require("socket"); |
2 | os.remove("/tmp/luasocket") | 2 | os.remove("/tmp/luasocket") |
3 | socket = require("socket.unix"); | 3 | socket.unix = require("socket.unix"); |
4 | host = "luasocket"; | 4 | host = host or "luasocket"; |
5 | server = socket.unix() | 5 | server = assert(socket.unix()) |
6 | print(server:bind(host)) | 6 | assert(server:bind(host)) |
7 | print(server:listen(5)) | 7 | assert(server:listen(5)) |
8 | ack = "\n"; | 8 | ack = "\n"; |
9 | while 1 do | 9 | while 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 |
17 | end | 17 | end |