Added check-links-nb.lua that check links in a non-blocking way.

This commit is contained in:
Diego Nehab
2005-06-20 04:51:55 +00:00
parent ae4ba2aa98
commit 37f7af4b9f
7 changed files with 341 additions and 27 deletions

View File

@ -122,7 +122,8 @@ int buf_meth_receive(lua_State *L, p_buf buf) {
if (p[0] == '*' && p[1] == 'l') err = recvline(buf, &b);
else if (p[0] == '*' && p[1] == 'a') err = recvall(buf, &b);
else luaL_argcheck(L, 0, 2, "invalid receive pattern");
/* get a fixed number of bytes */
/* get a fixed number of bytes (minus what was already partially
* received) */
} else err = recvraw(buf, (size_t) lua_tonumber(L, 2)-size, &b);
/* check if there was an error */
if (err != IO_DONE) {