Working on the manual...

Making better tests for error messages.
Changed a few names.
Moved gethostname to inet.c.
This commit is contained in:
Diego Nehab 2004-01-24 02:47:24 +00:00
parent 0c9f420a35
commit 62a4c505e4
21 changed files with 341 additions and 315 deletions

View file

@ -378,7 +378,7 @@ end
------------------------------------------------------------------------
function accept_errors()
io.write("not listenning: ")
io.write("not listening: ")
local d, e = socket.bind("*", 0)
assert(d, e);
local c, e = socket.tcp();
@ -392,7 +392,7 @@ function accept_errors()
assert(c, e);
d:setfd(c:getfd())
local r, e = d:accept()
assert(not r and e == "not supported", e)
assert(not r and e == "not supported" or e == "not listening", e)
print("ok")
end