This repository has been archived on 2022-12-23. You can view files and clone it, but cannot push or open issues or pull requests.
fuck-premake-old2/binmodules/luasocket/test/unixdgramsrvr.lua

10 lines
237 B
Lua

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