mirror of
https://github.com/lunarmodules/luasocket.git
synced 2025-07-13 06:04:31 +02:00
support datagram unix domain sockets
This commit is contained in:
9
test/unixudpsrvr.lua
Normal file
9
test/unixudpsrvr.lua
Normal file
@ -0,0 +1,9 @@
|
||||
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
|
Reference in New Issue
Block a user