From 22a5d3f669c2ad57b422b4cfa8e06cb4713aa12f Mon Sep 17 00:00:00 2001 From: Diego Nehab Date: Tue, 6 Mar 2001 19:54:57 +0000 Subject: [PATCH] Uptated for LuaSocket 1.2. The version released was incompatible... --- samples/listener.lua | 5 +++-- 1 file 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 @@ host = host or "localhost" -port = host or 8080 +port = port or 8080 if arg then host = arg[1] or host port = arg[2] or port end print("Binding to host '" ..host.. "' and port " ..port.. "...") -s, i, p, e = bind(host, port) +s, e = bind(host, port) if not s then print(e) exit() end +i, p = s:getsockname() print("Waiting connection from talker on " .. i .. ":" .. p .. "...") c, e = s:accept() if not c then