From bd54cd42d4c8a7d6bb9550d8aa0eac243cda63c0 Mon Sep 17 00:00:00 2001 From: Diego Nehab Date: Thu, 26 Jun 2003 21:14:17 +0000 Subject: [PATCH] Few adjustments for windows. --- etc/get.lua | 4 ++-- test/testclnt.lua | 6 +++--- test/testsrvr.lua | 2 +- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/etc/get.lua b/etc/get.lua index caaa607..a093e24 100644 --- a/etc/get.lua +++ b/etc/get.lua @@ -63,13 +63,13 @@ end -- kind of copied from luasocket's manual callback examples function receive2disk(file, size) local aux = { - start = socket._time(), + start = socket.time(), got = 0, file = io.open(file, "wb"), size = size } local receive_cb = function(chunk, err) - local dt = socket._time() - aux.start -- elapsed time since start + local dt = socket.time() - aux.start -- elapsed time since start if not chunk or chunk == "" then io.write("\n") aux.file:close() diff --git a/test/testclnt.lua b/test/testclnt.lua index e38c248..20ef0b6 100644 --- a/test/testclnt.lua +++ b/test/testclnt.lua @@ -84,19 +84,19 @@ function reconnect() remote [[ if data then data:close() data = nil end data = server:accept() - data:setoption("nodelay", true) + -- data:setoption("nodelay", true) ]] data, err = socket.connect(host, port) if not data then fail(err) else pass("connected!") end - data:setoption("nodelay", true) + -- data:setoption("nodelay", true) end pass("attempting control connection...") control, err = socket.connect(host, port) if err then fail(err) else pass("connected!") end -control:setoption("nodelay", true) +-- control:setoption("nodelay", true) ------------------------------------------------------------------------ test("method registration") diff --git a/test/testsrvr.lua b/test/testsrvr.lua index 39fe274..6010789 100644 --- a/test/testsrvr.lua +++ b/test/testsrvr.lua @@ -7,7 +7,7 @@ ack = "\n" while 1 do print("server: waiting for client connection..."); control = server:accept() - control:setoption("nodelay", true) + -- control:setoption("nodelay", true) while 1 do command, error = control:receive() if error then