luasocket/test/unixsrvr.lua
2007-04-09 22:04:13 +00:00

10 lines
237 B
Lua

socket = require"socket"
socket.unix = require"socket.unix"
u = assert(socket.unix())
assert(u:bind("/tmp/foo"))
assert(u:listen())
c = assert(u:accept())
while 1 do
print(assert(c:receive()))
end