diff options
author | Caleb Maclennan <caleb@alerque.com> | 2023-11-10 09:12:04 +0300 |
---|---|---|
committer | Caleb Maclennan <caleb@alerque.com> | 2023-11-10 09:12:04 +0300 |
commit | 5c4fc93d5f4137bf4c22ddf1a048c907a4a26727 (patch) | |
tree | a9a68e1f6a9c3bfe2b64fa1c3a4098865b7d3b5d /test/unixdgramclnt.lua | |
parent | ccef3bc4e2aa6ee5b997a80aabb58f4ff0b0e98f (diff) | |
parent | 43a97b7f0053313b43906371dbdc226271e6c8ab (diff) | |
download | luasocket-hjelmeland-patch-1.tar.gz luasocket-hjelmeland-patch-1.tar.bz2 luasocket-hjelmeland-patch-1.zip |
Merge branch 'master' into hjelmeland-patch-1hjelmeland-patch-1
Diffstat (limited to 'test/unixdgramclnt.lua')
-rw-r--r-- | test/unixdgramclnt.lua | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/test/unixdgramclnt.lua b/test/unixdgramclnt.lua new file mode 100644 index 0000000..9bd60f7 --- /dev/null +++ b/test/unixdgramclnt.lua | |||
@@ -0,0 +1,9 @@ | |||
1 | socket = require"socket" | ||
2 | socket.unix = require"socket.unix" | ||
3 | c = assert(socket.unix.dgram()) | ||
4 | print(c:bind("/tmp/bar")) | ||
5 | while 1 do | ||
6 | local l = io.read("*l") | ||
7 | assert(c:sendto(l, "/tmp/foo")) | ||
8 | print(assert(c:receivefrom())) | ||
9 | end | ||