static int IsSocketConnected(IntPtr L) { LuaScriptMgr.CheckArgsCount(L, 2); NetworkConn obj = (NetworkConn)LuaScriptMgr.GetNetObjectSelf(L, 1, "NetworkConn"); System.Net.Sockets.Socket arg0 = (System.Net.Sockets.Socket)LuaScriptMgr.GetNetObject(L, 2, typeof(System.Net.Sockets.Socket)); bool o = obj.IsSocketConnected(arg0); LuaScriptMgr.Push(L, o); return(1); }