summaryrefslogtreecommitdiff
path: root/Build/source/texk/web2c/luatexdir/luasocket/test/unixdgramclnt.lua
blob: 9bd60f7f7bd0d04d5e1e008957b099c2576ac269 (plain)
1
2
3
4
5
6
7
8
9
socket = require"socket"
socket.unix = require"socket.unix"
c = assert(socket.unix.dgram())
print(c:bind("/tmp/bar"))
while 1 do
    local l = io.read("*l")
    assert(c:sendto(l, "/tmp/foo"))
	print(assert(c:receivefrom()))
end