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/unixdgramclnt.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