unixstreamclnt.lua 192 B

12345678
  1. socket = require"socket"
  2. socket.unix = require"socket.unix"
  3. c = assert(socket.unix.stream())
  4. assert(c:connect("/tmp/foo"))
  5. while 1 do
  6. local l = io.read()
  7. assert(c:send(l .. "\n"))
  8. end