aboutsummaryrefslogtreecommitdiff
path: root/test/unixudpclnt.lua
diff options
context:
space:
mode:
Diffstat (limited to 'test/unixudpclnt.lua')
-rw-r--r--test/unixudpclnt.lua9
1 files changed, 9 insertions, 0 deletions
diff --git a/test/unixudpclnt.lua b/test/unixudpclnt.lua
new file mode 100644
index 0000000..bbbff7f
--- /dev/null
+++ b/test/unixudpclnt.lua
@@ -0,0 +1,9 @@
1socket = require"socket"
2socket.unix = require"socket.unix"
3c = assert(socket.unix.udp())
4c:bind("/tmp/bar")
5while 1 do
6 local l = io.read("*l")
7 assert(c:sendto(l, "/tmp/foo"))
8 print(assert(c:receivefrom()))
9end