aboutsummaryrefslogtreecommitdiff
path: root/src/tp.lua
diff options
context:
space:
mode:
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)