mirror of
https://github.com/lunarmodules/luasocket.git
synced 2024-11-08 14:28:21 +01:00
62a4c505e4
Making better tests for error messages. Changed a few names. Moved gethostname to inet.c.
14 lines
335 B
Lua
14 lines
335 B
Lua
local convert
|
|
if arg and arg[1] == '-d' then
|
|
convert = socket.mime.decode("base64")
|
|
else
|
|
local base64 = socket.mime.encode("base64")
|
|
local wrap = socket.mime.wrap()
|
|
convert = socket.mime.chain(base64, wrap)
|
|
end
|
|
while 1 do
|
|
local chunk = io.read(4096)
|
|
io.write(convert(chunk))
|
|
if not chunk then break end
|
|
end
|