mirror of
https://github.com/lunarmodules/luasocket.git
synced 2024-11-08 14:28:21 +01:00
10 lines
257 B
Lua
10 lines
257 B
Lua
|
marker = {['-u'] = '\10', ['-d'] = '\13\10'}
|
||
|
arg = arg or {'-u'}
|
||
|
marker = marker[arg[1]] or marker['-u']
|
||
|
local convert = socket.code.canonic(marker)
|
||
|
while 1 do
|
||
|
local chunk = io.read(4096)
|
||
|
io.write(convert(chunk))
|
||
|
if not chunk then break end
|
||
|
end
|