luasocket/test/unixstreamsrvr.lua

10 lines
244 B
Lua
Raw Permalink Normal View History

2007-04-10 00:04:13 +02:00
socket = require"socket"
socket.unix = require"socket.unix"
u = assert(socket.unix.stream())
2007-04-10 00:04:13 +02:00
assert(u:bind("/tmp/foo"))
assert(u:listen())
c = assert(u:accept())
while 1 do
print(assert(c:receive()))
end