luasocket/test/unixtcpsrvr.lua

10 lines
241 B
Lua
Raw Normal View History

2007-04-10 00:04:13 +02:00
socket = require"socket"
socket.unix = require"socket.unix"
2016-06-24 15:23:00 +02:00
u = assert(socket.unix.tcp())
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