aboutsummaryrefslogtreecommitdiff
path: root/test/unixudpclnt.lua
blob: bbbff7f490bb774eb451ac73504fff2a80058630 (plain)
1
2
3
4
5
6
7
8
9
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