mirror of
https://github.com/lunarmodules/luasocket.git
synced 2025-07-13 06:04:31 +02:00
Porting to LUA 5.0 final
This commit is contained in:
@ -5,18 +5,18 @@ if arg then
|
||||
port = arg[2] or port
|
||||
end
|
||||
print("Attempting connection to host '" ..host.. "' and port " ..port.. "...")
|
||||
c, e = connect(host, port)
|
||||
c, e = socket.connect(host, port)
|
||||
if not c then
|
||||
print(e)
|
||||
exit()
|
||||
os.exit()
|
||||
end
|
||||
print("Connected! Please type stuff (empty line to stop):")
|
||||
l = read()
|
||||
l = io.read()
|
||||
while l and l ~= "" and not e do
|
||||
e = c:send(l, "\n")
|
||||
t, e = c:send(l, "\n")
|
||||
if e then
|
||||
print(e)
|
||||
exit()
|
||||
os.exit()
|
||||
end
|
||||
l = read()
|
||||
l = io.read()
|
||||
end
|
||||
|
Reference in New Issue
Block a user