support datagram unix domain sockets

This commit is contained in:
enginix 2016-06-24 21:23:00 +08:00
parent 30a64c585a
commit aa1b8cc9bc
10 changed files with 803 additions and 316 deletions

8
test/unixtcpclnt.lua Normal file
View file

@ -0,0 +1,8 @@
socket = require"socket"
socket.unix = require"socket.unix"
c = assert(socket.unix.tcp())
assert(c:connect("/tmp/foo"))
while 1 do
local l = io.read()
assert(c:send(l .. "\n"))
end