aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDiego Nehab <diego@tecgraf.puc-rio.br>2001-03-06 19:54:57 +0000
committerDiego Nehab <diego@tecgraf.puc-rio.br>2001-03-06 19:54:57 +0000
commit22a5d3f669c2ad57b422b4cfa8e06cb4713aa12f (patch)
treee49c961c24290781304be40ae7d196357754a260
parent2c9008772ef9c015569204bede90152ed975d0cc (diff)
downloadluasocket-22a5d3f669c2ad57b422b4cfa8e06cb4713aa12f.tar.gz
luasocket-22a5d3f669c2ad57b422b4cfa8e06cb4713aa12f.tar.bz2
luasocket-22a5d3f669c2ad57b422b4cfa8e06cb4713aa12f.zip
Uptated for LuaSocket 1.2. The version released was incompatible...
-rw-r--r--samples/listener.lua5
1 files changed, 3 insertions, 2 deletions
diff --git a/samples/listener.lua b/samples/listener.lua
index 5e1eb02..f9ee3bf 100644
--- a/samples/listener.lua
+++ b/samples/listener.lua
@@ -1,15 +1,16 @@
1host = host or "localhost" 1host = host or "localhost"
2port = host or 8080 2port = port or 8080
3if arg then 3if arg then
4 host = arg[1] or host 4 host = arg[1] or host
5 port = arg[2] or port 5 port = arg[2] or port
6end 6end
7print("Binding to host '" ..host.. "' and port " ..port.. "...") 7print("Binding to host '" ..host.. "' and port " ..port.. "...")
8s, i, p, e = bind(host, port) 8s, e = bind(host, port)
9if not s then 9if not s then
10 print(e) 10 print(e)
11 exit() 11 exit()
12end 12end
13i, p = s:getsockname()
13print("Waiting connection from talker on " .. i .. ":" .. p .. "...") 14print("Waiting connection from talker on " .. i .. ":" .. p .. "...")
14c, e = s:accept() 15c, e = s:accept()
15if not c then 16if not c then