diff options
author | Diego Nehab <diego@tecgraf.puc-rio.br> | 2003-06-26 21:14:17 +0000 |
---|---|---|
committer | Diego Nehab <diego@tecgraf.puc-rio.br> | 2003-06-26 21:14:17 +0000 |
commit | bd54cd42d4c8a7d6bb9550d8aa0eac243cda63c0 (patch) | |
tree | e182ffe6061141df20fa2003b6671af8a4ea3c40 | |
parent | 71f6bb60bf2b7457091c7106190f92ab7e51f7c6 (diff) | |
download | luasocket-bd54cd42d4c8a7d6bb9550d8aa0eac243cda63c0.tar.gz luasocket-bd54cd42d4c8a7d6bb9550d8aa0eac243cda63c0.tar.bz2 luasocket-bd54cd42d4c8a7d6bb9550d8aa0eac243cda63c0.zip |
Few adjustments for windows.
-rw-r--r-- | etc/get.lua | 4 | ||||
-rw-r--r-- | test/testclnt.lua | 6 | ||||
-rw-r--r-- | 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 | |||
63 | -- kind of copied from luasocket's manual callback examples | 63 | -- kind of copied from luasocket's manual callback examples |
64 | function receive2disk(file, size) | 64 | function receive2disk(file, size) |
65 | local aux = { | 65 | local aux = { |
66 | start = socket._time(), | 66 | start = socket.time(), |
67 | got = 0, | 67 | got = 0, |
68 | file = io.open(file, "wb"), | 68 | file = io.open(file, "wb"), |
69 | size = size | 69 | size = size |
70 | } | 70 | } |
71 | local receive_cb = function(chunk, err) | 71 | local receive_cb = function(chunk, err) |
72 | local dt = socket._time() - aux.start -- elapsed time since start | 72 | local dt = socket.time() - aux.start -- elapsed time since start |
73 | if not chunk or chunk == "" then | 73 | if not chunk or chunk == "" then |
74 | io.write("\n") | 74 | io.write("\n") |
75 | aux.file:close() | 75 | 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() | |||
84 | remote [[ | 84 | remote [[ |
85 | if data then data:close() data = nil end | 85 | if data then data:close() data = nil end |
86 | data = server:accept() | 86 | data = server:accept() |
87 | data:setoption("nodelay", true) | 87 | -- data:setoption("nodelay", true) |
88 | ]] | 88 | ]] |
89 | data, err = socket.connect(host, port) | 89 | data, err = socket.connect(host, port) |
90 | if not data then fail(err) | 90 | if not data then fail(err) |
91 | else pass("connected!") end | 91 | else pass("connected!") end |
92 | data:setoption("nodelay", true) | 92 | -- data:setoption("nodelay", true) |
93 | end | 93 | end |
94 | 94 | ||
95 | pass("attempting control connection...") | 95 | pass("attempting control connection...") |
96 | control, err = socket.connect(host, port) | 96 | control, err = socket.connect(host, port) |
97 | if err then fail(err) | 97 | if err then fail(err) |
98 | else pass("connected!") end | 98 | else pass("connected!") end |
99 | control:setoption("nodelay", true) | 99 | -- control:setoption("nodelay", true) |
100 | 100 | ||
101 | ------------------------------------------------------------------------ | 101 | ------------------------------------------------------------------------ |
102 | test("method registration") | 102 | 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" | |||
7 | while 1 do | 7 | while 1 do |
8 | print("server: waiting for client connection..."); | 8 | print("server: waiting for client connection..."); |
9 | control = server:accept() | 9 | control = server:accept() |
10 | control:setoption("nodelay", true) | 10 | -- control:setoption("nodelay", true) |
11 | while 1 do | 11 | while 1 do |
12 | command, error = control:receive() | 12 | command, error = control:receive() |
13 | if error then | 13 | if error then |