luasocket/test/unixtcpclnt.lua
2016-06-24 21:33:19 +08:00

9 lines
189 B
Lua

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