From 2562738e2db9d7654c48c10247e683215e09b4a5 Mon Sep 17 00:00:00 2001 From: Diego Nehab Date: Thu, 1 Jul 2004 05:38:44 +0000 Subject: [PATCH] Forgot a few files. --- FIX | 1 + test/excepttest.lua | 6 ++++++ test/unixtest.lua | 10 ++++++++++ 3 files changed, 17 insertions(+) create mode 100644 test/excepttest.lua create mode 100644 test/unixtest.lua diff --git a/FIX b/FIX index 0972403..c2b04e0 100644 --- a/FIX +++ b/FIX @@ -7,3 +7,4 @@ new timming functions. higher resolution, no wrap around bug fixes in the manual getfd missing cast added unix domain support example +fixed local domain socket kludge of name size diff --git a/test/excepttest.lua b/test/excepttest.lua new file mode 100644 index 0000000..ce9f197 --- /dev/null +++ b/test/excepttest.lua @@ -0,0 +1,6 @@ +local socket = require("socket") +try = socket.newtry(function() + print("finalized!!!") +end) +try = socket.protect(try) +print(try(nil, "it works")) diff --git a/test/unixtest.lua b/test/unixtest.lua new file mode 100644 index 0000000..e70b356 --- /dev/null +++ b/test/unixtest.lua @@ -0,0 +1,10 @@ +socket = require("socket") +f = loadlib("etc-1.0.dylib", "unix_open") +f(socket) +u = socket.unix() +print(u:bind("/tmp/luasocket")) +print(u:listen()) +c = u:accept() +while 1 do + print(assert(c:receive())) +end