blob: 4c11f552c64c39b5918605b3009151c68bf0851f (
plain)
1
2
3
4
5
6
7
8
9
|
socket = require"socket"
socket.unix = require"socket.unix"
u = assert(socket.unix.dgram())
assert(u:bind("/tmp/foo"))
while 1 do
x, r = assert(u:receivefrom())
print(x, r)
assert(u:sendto(">" .. x, r))
end
|