diff options
author | Diego Nehab <diego@tecgraf.puc-rio.br> | 2003-03-28 21:08:50 +0000 |
---|---|---|
committer | Diego Nehab <diego@tecgraf.puc-rio.br> | 2003-03-28 21:08:50 +0000 |
commit | f18d1b7cd0ec4708518ab5e18ea33b6eadca0301 (patch) | |
tree | e831c6b1957af47db1301675b52c0d2a2e315fa7 /samples/listener.lua | |
parent | 307603b24dde69eac62d2cb52123488137520c9c (diff) | |
download | luasocket-f18d1b7cd0ec4708518ab5e18ea33b6eadca0301.tar.gz luasocket-f18d1b7cd0ec4708518ab5e18ea33b6eadca0301.tar.bz2 luasocket-f18d1b7cd0ec4708518ab5e18ea33b6eadca0301.zip |
Closer to release...
Diffstat (limited to 'samples/listener.lua')
-rw-r--r-- | samples/listener.lua | 6 |
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 | ----------------------------------------------------------------------------- | ||
1 | host = host or "*" | 5 | host = host or "*" |
2 | port = port or 8080 | 6 | port = port or 8080 |
3 | if arg then | 7 | if arg then |
@@ -5,7 +9,7 @@ if arg then | |||
5 | port = arg[2] or port | 9 | port = arg[2] or port |
6 | end | 10 | end |
7 | print("Binding to host '" ..host.. "' and port " ..port.. "...") | 11 | print("Binding to host '" ..host.. "' and port " ..port.. "...") |
8 | s, e = bind(host, port) | 12 | s, e = socket.bind(host, port) |
9 | if not s then | 13 | if not s then |
10 | print(e) | 14 | print(e) |
11 | exit() | 15 | exit() |