Have to figure out how to test timeout on connect... kind of hard.
This commit is contained in:
parent
87e8737218
commit
50ce143725
2 changed files with 12 additions and 12 deletions
|
@ -230,7 +230,7 @@ static int meth_bind(lua_State *L)
|
|||
p_tcp tcp = (p_tcp) aux_checkclass(L, "tcp{master}", 1);
|
||||
const char *address = luaL_checkstring(L, 2);
|
||||
unsigned short port = (unsigned short) luaL_checknumber(L, 3);
|
||||
int backlog = (int) luaL_optnumber(L, 4, 1);
|
||||
int backlog = (int) luaL_optnumber(L, 4, 0);
|
||||
const char *err = inet_trybind(&tcp->sock, address, port, backlog);
|
||||
if (err) {
|
||||
lua_pushnil(L);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue