aboutsummaryrefslogtreecommitdiff
path: root/samples/listener.lua
diff options
context:
space:
mode:
authorDiego Nehab <diego@tecgraf.puc-rio.br>2003-03-28 21:08:50 +0000
committerDiego Nehab <diego@tecgraf.puc-rio.br>2003-03-28 21:08:50 +0000
commitf18d1b7cd0ec4708518ab5e18ea33b6eadca0301 (patch)
treee831c6b1957af47db1301675b52c0d2a2e315fa7 /samples/listener.lua
parent307603b24dde69eac62d2cb52123488137520c9c (diff)
downloadluasocket-f18d1b7cd0ec4708518ab5e18ea33b6eadca0301.tar.gz
luasocket-f18d1b7cd0ec4708518ab5e18ea33b6eadca0301.tar.bz2
luasocket-f18d1b7cd0ec4708518ab5e18ea33b6eadca0301.zip
Closer to release...
Diffstat (limited to 'samples/listener.lua')
-rw-r--r--samples/listener.lua6
1 files changed, 5 insertions, 1 deletions
diff --git a/samples/listener.lua b/samples/listener.lua
index 8e2c7ce..c035ab2 100644
--- a/samples/listener.lua
+++ b/samples/listener.lua
@@ -1,3 +1,7 @@
1-----------------------------------------------------------------------------
2-- Little program to dump lines received at a given port
3-- LuaSocket 1.5 sample files
4-----------------------------------------------------------------------------
1host = host or "*" 5host = host or "*"
2port = port or 8080 6port = port or 8080
3if arg then 7if arg then
@@ -5,7 +9,7 @@ if arg then
5 port = arg[2] or port 9 port = arg[2] or port
6end 10end
7print("Binding to host '" ..host.. "' and port " ..port.. "...") 11print("Binding to host '" ..host.. "' and port " ..port.. "...")
8s, e = bind(host, port) 12s, e = socket.bind(host, port)
9if not s then 13if not s then
10 print(e) 14 print(e)
11 exit() 15 exit()