mirror of
https://github.com/lunarmodules/luasocket.git
synced 2024-11-12 16:28:22 +01:00
10 lines
229 B
Lua
10 lines
229 B
Lua
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
|