aboutsummaryrefslogtreecommitdiff
path: root/src/tcp.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/tcp.c')
-rw-r--r--src/tcp.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/src/tcp.c b/src/tcp.c
index 618f4ce..0b3706b 100644
--- a/src/tcp.c
+++ b/src/tcp.c
@@ -91,8 +91,6 @@ int tcp_open(lua_State *L)
91 aux_add2group(L, "tcp{master}", "tcp{any}"); 91 aux_add2group(L, "tcp{master}", "tcp{any}");
92 aux_add2group(L, "tcp{client}", "tcp{any}"); 92 aux_add2group(L, "tcp{client}", "tcp{any}");
93 aux_add2group(L, "tcp{server}", "tcp{any}"); 93 aux_add2group(L, "tcp{server}", "tcp{any}");
94 aux_add2group(L, "tcp{client}", "tcp{client,server}");
95 aux_add2group(L, "tcp{server}", "tcp{client,server}");
96 /* define library functions */ 94 /* define library functions */
97 luaL_openlib(L, NULL, func, 0); 95 luaL_openlib(L, NULL, func, 0);
98 return 0; 96 return 0;
@@ -261,7 +259,7 @@ static int meth_listen(lua_State *L)
261\*-------------------------------------------------------------------------*/ 259\*-------------------------------------------------------------------------*/
262static int meth_shutdown(lua_State *L) 260static int meth_shutdown(lua_State *L)
263{ 261{
264 p_tcp tcp = (p_tcp) aux_checkgroup(L, "tcp{client}", 1); 262 p_tcp tcp = (p_tcp) aux_checkclass(L, "tcp{client}", 1);
265 const char *how = luaL_optstring(L, 2, "both"); 263 const char *how = luaL_optstring(L, 2, "both");
266 switch (how[0]) { 264 switch (how[0]) {
267 case 'b': 265 case 'b':