mirror of
https://github.com/lunarmodules/luasocket.git
synced 2025-07-13 06:04:31 +02:00
Committing with require.
This commit is contained in:
@ -1,3 +1,5 @@
|
||||
require("ltn12")
|
||||
require("mime")
|
||||
local source = ltn12.source.file(io.stdin)
|
||||
local sink = ltn12.sink.file(io.stdout)
|
||||
local convert
|
||||
|
@ -8,12 +8,11 @@ function get_status(sock, valid)
|
||||
local line, err = sock:receive()
|
||||
local code, par
|
||||
if not line then sock:close() return err end
|
||||
_, _, code = string.find(line, "^(%d%d%d)")
|
||||
code = socket.skip(2, string.find(line, "^(%d%d%d)"))
|
||||
code = tonumber(code)
|
||||
if code ~= valid then return code end
|
||||
if code == 150 then
|
||||
_,_,_, par = string.find(line, "^(%d%d%d) (%d*)")
|
||||
par = tonumber(par)
|
||||
par = tonumber(socket.skip(2, string.find(line, "^%d%d%d (%d*)"))
|
||||
end
|
||||
return nil, par
|
||||
end
|
||||
|
Reference in New Issue
Block a user