mirror of
https://github.com/lunarmodules/luasocket.git
synced 2024-11-08 22:38:21 +01:00
10 lines
235 B
Lua
10 lines
235 B
Lua
socket = require"socket"
|
|
socket.unix = require"socket.unix"
|
|
u = assert(socket.unix.udp())
|
|
assert(u:bind("/tmp/foo"))
|
|
while 1 do
|
|
x, r = assert(u:receivefrom())
|
|
print(x, r)
|
|
assert(u:sendto(">" .. x, r))
|
|
end
|