add mongo driver from lua-mongo project (wip)

This commit is contained in:
云风
2013-07-30 14:51:26 +08:00
parent 1b4b46d271
commit 940abe6dff
4 changed files with 841 additions and 0 deletions

View File

@@ -226,7 +226,14 @@ function socket.write(fd, msg, sz)
return true
end
function socket.invalid(fd)
return CLOSED[fd] or not READBUF[fd]
end
function socket.lock(fd)
if CLOSED[fd] or not READBUF[fd] then
return
end
local locked = READTHREAD[fd]
if locked then
-- lock fd