luasocket/test/unixclnt.lua

9 lines
185 B
Lua
Raw Normal View History

2007-04-09 22:04:13 +00:00
socket = require"socket"
socket.unix = require"socket.unix"
c = assert(socket.unix())
assert(c:connect("/tmp/foo"))
while 1 do
local l = io.read()
assert(c:send(l .. "\n"))
end