diff options
| author | Diego Nehab <diego@tecgraf.puc-rio.br> | 2005-01-02 22:44:00 +0000 |
|---|---|---|
| committer | Diego Nehab <diego@tecgraf.puc-rio.br> | 2005-01-02 22:44:00 +0000 |
| commit | 97b26e0b66c840a446a0179200c7df23565330d1 (patch) | |
| tree | 272f9ea0451f13b563451fb8df21a03669e90d09 /samples/talker.lua | |
| parent | a8254e94f8c14ac15b02be53a1cc69ba80899230 (diff) | |
| download | luasocket-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.lua | 4 |
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 |
| 13 | end | 13 | end |
| 14 | print("Attempting connection to host '" ..host.. "' and port " ..port.. "...") | 14 | print("Attempting connection to host '" ..host.. "' and port " ..port.. "...") |
| 15 | c = socket.try(socket.connect(host, port)) | 15 | c = assert(socket.connect(host, port)) |
| 16 | print("Connected! Please type stuff (empty line to stop):") | 16 | print("Connected! Please type stuff (empty line to stop):") |
| 17 | l = io.read() | 17 | l = io.read() |
| 18 | while l and l ~= "" and not e do | 18 | while 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() |
| 21 | end | 21 | end |
