mirror of
https://github.com/lunarmodules/luasocket.git
synced 2024-11-08 22:38:21 +01:00
10 lines
220 B
Lua
10 lines
220 B
Lua
socket = require"socket"
|
|
socket.unix = require"socket.unix"
|
|
c = assert(socket.unix.udp())
|
|
c:bind("/tmp/bar")
|
|
while 1 do
|
|
local l = io.read("*l")
|
|
assert(c:sendto(l, "/tmp/foo"))
|
|
print(assert(c:receivefrom()))
|
|
end
|