Skip to content

Commit

Permalink
Fixed documentation of socket:connect
Browse files Browse the repository at this point in the history
  • Loading branch information
Reuh committed Oct 24, 2015
1 parent 3aeb5b3 commit 8e94add
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion source/socket.c
Expand Up @@ -139,6 +139,9 @@ Connect a socket to a server. The TCP object becomes a TCPClient object.
@function :connect
@tparam string host address of the host
@tparam number port port of the server
@treturn[1] boolean true if success
@treturn[2] boolean false if failed
@treturn[2] string error string
*/
static int socket_connect(lua_State *L) {
socket_userdata *userdata = luaL_checkudata(L, 1, "LSocket");
Expand All @@ -161,7 +164,7 @@ static int socket_connect(lua_State *L) {
return 2;
}

lua_pushinteger(L, 1);
lua_pushboolean(L, 1);
return 1;
}

Expand Down

0 comments on commit 8e94add

Please sign in to comment.