From 8e94add9a685243600217ae559703e1a1a407107 Mon Sep 17 00:00:00 2001 From: Reuh Date: Sat, 24 Oct 2015 13:34:53 +0200 Subject: [PATCH] Fixed documentation of socket:connect --- source/socket.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/source/socket.c b/source/socket.c index 3ad23c2..3d7f7b9 100644 --- a/source/socket.c +++ b/source/socket.c @@ -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"); @@ -161,7 +164,7 @@ static int socket_connect(lua_State *L) { return 2; } - lua_pushinteger(L, 1); + lua_pushboolean(L, 1); return 1; }