aboutsummaryrefslogtreecommitdiff
path: root/src/tp.lua
diff options
context:
space:
mode:
authorDiego Nehab <diego@tecgraf.puc-rio.br>2004-06-16 01:02:07 +0000
committerDiego Nehab <diego@tecgraf.puc-rio.br>2004-06-16 01:02:07 +0000
commitd46f7a09a768b146f2f3cdc9a6a50357832bd1c7 (patch)
treed4f7ca1e677d06446245691d5ece6dab51915f16 /src/tp.lua
parent843a431ef98fd541d98fd3898463985d9bfcde28 (diff)
downloadluasocket-d46f7a09a768b146f2f3cdc9a6a50357832bd1c7.tar.gz
luasocket-d46f7a09a768b146f2f3cdc9a6a50357832bd1c7.tar.bz2
luasocket-d46f7a09a768b146f2f3cdc9a6a50357832bd1c7.zip
Fixed smtp.lua loading.
Adjusted tftp module. Added some comments.
Diffstat (limited to 'src/tp.lua')
-rw-r--r--src/tp.lua4
1 files changed, 0 insertions, 4 deletions
diff --git a/src/tp.lua b/src/tp.lua
index 56dd8bc..731191e 100644
--- a/src/tp.lua
+++ b/src/tp.lua
@@ -49,7 +49,6 @@ local metat = { __index = {} }
49 49
50function metat.__index:check(ok) 50function metat.__index:check(ok)
51 local code, reply = get_reply(self.control) 51 local code, reply = get_reply(self.control)
52print(reply)
53 if not code then return nil, reply end 52 if not code then return nil, reply end
54 if type(ok) ~= "function" then 53 if type(ok) ~= "function" then
55 if type(ok) == "table" then 54 if type(ok) == "table" then
@@ -65,7 +64,6 @@ print(reply)
65end 64end
66 65
67function metat.__index:command(cmd, arg) 66function metat.__index:command(cmd, arg)
68print(cmd, arg)
69 if arg then return self.control:send(cmd .. " " .. arg.. "\r\n") 67 if arg then return self.control:send(cmd .. " " .. arg.. "\r\n")
70 else return self.control:send(cmd .. "\r\n") end 68 else return self.control:send(cmd .. "\r\n") end
71end 69end
@@ -113,5 +111,3 @@ connect = socket.protect(function(host, port, timeout)
113 socket.try(control:connect(host, port)) 111 socket.try(control:connect(host, port))
114 return setmetatable({control = control}, metat) 112 return setmetatable({control = control}, metat)
115end) 113end)
116
117return tp