static int Unload(IntPtr L) { try { ToLua.CheckArgsCount(L, 1); Framework.NetworkManager obj = (Framework.NetworkManager)ToLua.CheckObject <Framework.NetworkManager>(L, 1); obj.Unload(); return(0); } catch (Exception e) { return(LuaDLL.toluaL_exception(L, e)); } }
static int GetNetManager(IntPtr L) { try { ToLua.CheckArgsCount(L, 0); Framework.NetworkManager o = Framework.Utility.LuaHelper.GetNetManager(); ToLua.Push(L, o); return(1); } catch (Exception e) { return(LuaDLL.toluaL_exception(L, e)); } }
static int SendNetMessage(IntPtr L) { try { ToLua.CheckArgsCount(L, 2); Framework.NetworkManager obj = (Framework.NetworkManager)ToLua.CheckObject <Framework.NetworkManager>(L, 1); string arg0 = ToLua.CheckString(L, 2); obj.SendNetMessage(arg0); return(0); } catch (Exception e) { return(LuaDLL.toluaL_exception(L, e)); } }
static int SendConnect(IntPtr L) { try { ToLua.CheckArgsCount(L, 3); Framework.NetworkManager obj = (Framework.NetworkManager)ToLua.CheckObject <Framework.NetworkManager>(L, 1); string arg0 = ToLua.CheckString(L, 2); int arg1 = (int)LuaDLL.luaL_checknumber(L, 3); obj.SendConnect(arg0, arg1); return(0); } catch (Exception e) { return(LuaDLL.toluaL_exception(L, e)); } }