diff options
| author | Diego Nehab <diego@tecgraf.puc-rio.br> | 2006-03-14 09:04:15 +0000 |
|---|---|---|
| committer | Diego Nehab <diego@tecgraf.puc-rio.br> | 2006-03-14 09:04:15 +0000 |
| commit | 09ad4b299c59c3c5c6c442f0ee99f3c9e8dbe8ce (patch) | |
| tree | 3d56df0d8e1a22386877f8d5007c67fbd98777f7 /src/tp.lua | |
| parent | 6248b915cba040a3d04fedd100637e1465a43cc7 (diff) | |
| download | luasocket-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.lua | 4 |
1 files changed, 2 insertions, 2 deletions
| @@ -109,8 +109,8 @@ function metat.__index:close() | |||
| 109 | end | 109 | end |
| 110 | 110 | ||
| 111 | -- connect with server and return c object | 111 | -- connect with server and return c object |
| 112 | function connect(host, port, create, timeout) | 112 | function 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) |
