File: unixtcpsrvr.lua

package info (click to toggle)
luasocket 3.0~rc1%2Bgit%2Bac3201d-4
  • links: PTS, VCS
  • area: main
  • in suites: bullseye, buster
  • size: 2,216 kB
  • sloc: ansic: 4,487; makefile: 320; sh: 116
file content (9 lines) | stat: -rw-r--r-- 241 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
    socket = require"socket"
    socket.unix = require"socket.unix"
    u = assert(socket.unix.tcp())
    assert(u:bind("/tmp/foo"))
    assert(u:listen())
    c = assert(u:accept())
    while 1 do
        print(assert(c:receive()))
    end