aboutsummaryrefslogtreecommitdiff
path: root/samples/talker.lua
diff options
context:
space:
mode:
authorDiego Nehab <diego@tecgraf.puc-rio.br>2005-01-02 22:44:00 +0000
committerDiego Nehab <diego@tecgraf.puc-rio.br>2005-01-02 22:44:00 +0000
commit97b26e0b66c840a446a0179200c7df23565330d1 (patch)
tree272f9ea0451f13b563451fb8df21a03669e90d09 /samples/talker.lua
parenta8254e94f8c14ac15b02be53a1cc69ba80899230 (diff)
downloadluasocket-97b26e0b66c840a446a0179200c7df23565330d1.tar.gz
luasocket-97b26e0b66c840a446a0179200c7df23565330d1.tar.bz2
luasocket-97b26e0b66c840a446a0179200c7df23565330d1.zip
Almost ready to release beta3
Diffstat (limited to 'samples/talker.lua')
-rw-r--r--samples/talker.lua4
1 files changed, 2 insertions, 2 deletions
diff --git a/samples/talker.lua b/samples/talker.lua
index 3f6e69c..901ed2c 100644
--- a/samples/talker.lua
+++ b/samples/talker.lua
@@ -12,10 +12,10 @@ if arg then
12 port = arg[2] or port 12 port = arg[2] or port
13end 13end
14print("Attempting connection to host '" ..host.. "' and port " ..port.. "...") 14print("Attempting connection to host '" ..host.. "' and port " ..port.. "...")
15c = socket.try(socket.connect(host, port)) 15c = assert(socket.connect(host, port))
16print("Connected! Please type stuff (empty line to stop):") 16print("Connected! Please type stuff (empty line to stop):")
17l = io.read() 17l = io.read()
18while l and l ~= "" and not e do 18while l and l ~= "" and not e do
19 socket.try(c:send(l, "\n")) 19 assert(c:send(l .. "\n"))
20 l = io.read() 20 l = io.read()
21end 21end