aboutsummaryrefslogtreecommitdiff
path: root/src/tp.lua
diff options
context:
space:
mode:
authorDiego Nehab <diego@tecgraf.puc-rio.br>2006-03-14 09:04:15 +0000
committerDiego Nehab <diego@tecgraf.puc-rio.br>2006-03-14 09:04:15 +0000
commit09ad4b299c59c3c5c6c442f0ee99f3c9e8dbe8ce (patch)
tree3d56df0d8e1a22386877f8d5007c67fbd98777f7 /src/tp.lua
parent6248b915cba040a3d04fedd100637e1465a43cc7 (diff)
downloadluasocket-09ad4b299c59c3c5c6c442f0ee99f3c9e8dbe8ce.tar.gz
luasocket-09ad4b299c59c3c5c6c442f0ee99f3c9e8dbe8ce.tar.bz2
luasocket-09ad4b299c59c3c5c6c442f0ee99f3c9e8dbe8ce.zip
Chose option 1) for http.lua.
Need to fix everything to make sure it works with the new compat-5.1
Diffstat (limited to 'src/tp.lua')
-rw-r--r--src/tp.lua4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/tp.lua b/src/tp.lua
index c6d60c8..2eacdc4 100644
--- a/src/tp.lua
+++ b/src/tp.lua
@@ -109,8 +109,8 @@ function metat.__index:close()
109end 109end
110 110
111-- connect with server and return c object 111-- connect with server and return c object
112function connect(host, port, create, timeout) 112function connect(host, port, timeout, create)
113 local c, e = (create or socket.tcp()) 113 local c, e = (create or socket.tcp)()
114 if not c then return nil, e end 114 if not c then return nil, e end
115 c:settimeout(timeout or TIMEOUT) 115 c:settimeout(timeout or TIMEOUT)
116 local r, e = c:connect(host, port) 116 local r, e = c:connect(host, port)