File: unixclnt.lua

package info (click to toggle)
luasocket 3.0~rc1-3
  • links: PTS, VCS
  • area: main
  • in suites: jessie, jessie-kfreebsd
  • size: 2,144 kB
  • ctags: 995
  • sloc: ansic: 4,059; makefile: 268; sh: 116
file content (8 lines) | stat: -rw-r--r-- 185 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
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