//this source code was auto-generated by tolua#, do not modify it using System; using LuaInterface; public class NetworkMgrWrap { public static void Register(LuaState L) { L.BeginClass(typeof(NetworkMgr), typeof(Singleton)); L.RegFunction("Init", Init); L.RegFunction("SetGameServerConnectedLuaFunc", SetGameServerConnectedLuaFunc); L.RegFunction("ConnectServer", ConnectServer); L.RegFunction("ResetSending", ResetSending); L.RegFunction("GetConnectStatus", GetConnectStatus); L.RegFunction("Disconnect", Disconnect); L.RegFunction("CloseGameServerConnect", CloseGameServerConnect); L.RegFunction("SetAesKey", SetAesKey); L.RegFunction("SendMsg", SendMsg); L.RegFunction("SendMsgWithRSA", SendMsgWithRSA); L.RegFunction("SendMsgWithAES", SendMsgWithAES); L.RegFunction("Update", Update); L.RegFunction("OnProtocolLua", OnProtocolLua); L.RegFunction("Resume", Resume); L.RegFunction("StartReconnect", StartReconnect); L.RegFunction("HasCmdIdAtConfirmQueue", HasCmdIdAtConfirmQueue); L.RegFunction("New", _CreateNetworkMgr); L.RegFunction("__tostring", ToLua.op_ToString); L.RegConstant("c_RSA_Encrypt", 1); L.RegConstant("c_AES_Encrypt", 2); L.RegConstant("c_pingCmdId", 1000); L.RegConstant("c_pingCmdAck", 1001); L.RegConstant("c_reconnectCmdAck", 1005); L.RegVar("gameSrv", get_gameSrv, set_gameSrv); L.RegVar("m_GameReconnetCount", get_m_GameReconnetCount, set_m_GameReconnetCount); L.RegVar("isOnlineMode", get_isOnlineMode, set_isOnlineMode); L.RegVar("heartDelayTime", get_heartDelayTime, null); L.RegVar("ReceiveMessageFunc", get_ReceiveMessageFunc, set_ReceiveMessageFunc); L.RegVar("OpenReconnectionWndFunc", get_OpenReconnectionWndFunc, set_OpenReconnectionWndFunc); L.RegVar("LuaNoitceFunc", get_LuaNoitceFunc, set_LuaNoitceFunc); L.RegVar("IsLogin", get_IsLogin, set_IsLogin); L.EndClass(); } [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))] static int _CreateNetworkMgr(IntPtr L) { try { int count = LuaDLL.lua_gettop(L); if (count == 0) { NetworkMgr obj = new NetworkMgr(); ToLua.PushObject(L, obj); return 1; } else { return LuaDLL.luaL_throw(L, "invalid arguments to ctor method: NetworkMgr.New"); } } catch (Exception e) { return LuaDLL.toluaL_exception(L, e); } } [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))] static int Init(IntPtr L) { try { ToLua.CheckArgsCount(L, 1); NetworkMgr obj = (NetworkMgr)ToLua.CheckObject(L, 1); obj.Init(); return 0; } catch (Exception e) { return LuaDLL.toluaL_exception(L, e); } } [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))] static int SetGameServerConnectedLuaFunc(IntPtr L) { try { ToLua.CheckArgsCount(L, 2); NetworkMgr obj = (NetworkMgr)ToLua.CheckObject(L, 1); LuaFunction arg0 = ToLua.CheckLuaFunction(L, 2); obj.SetGameServerConnectedLuaFunc(arg0); return 0; } catch (Exception e) { return LuaDLL.toluaL_exception(L, e); } } [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))] static int ConnectServer(IntPtr L) { try { ToLua.CheckArgsCount(L, 3); NetworkMgr obj = (NetworkMgr)ToLua.CheckObject(L, 1); string arg0 = ToLua.CheckString(L, 2); int arg1 = (int)LuaDLL.luaL_checknumber(L, 3); bool o = obj.ConnectServer(arg0, arg1); LuaDLL.lua_pushboolean(L, o); return 1; } catch (Exception e) { return LuaDLL.toluaL_exception(L, e); } } [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))] static int ResetSending(IntPtr L) { try { ToLua.CheckArgsCount(L, 1); NetworkMgr obj = (NetworkMgr)ToLua.CheckObject(L, 1); obj.ResetSending(); return 0; } catch (Exception e) { return LuaDLL.toluaL_exception(L, e); } } [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))] static int GetConnectStatus(IntPtr L) { try { ToLua.CheckArgsCount(L, 1); NetworkMgr obj = (NetworkMgr)ToLua.CheckObject(L, 1); bool o = obj.GetConnectStatus(); LuaDLL.lua_pushboolean(L, o); return 1; } catch (Exception e) { return LuaDLL.toluaL_exception(L, e); } } [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))] static int Disconnect(IntPtr L) { try { ToLua.CheckArgsCount(L, 1); NetworkMgr obj = (NetworkMgr)ToLua.CheckObject(L, 1); obj.Disconnect(); return 0; } catch (Exception e) { return LuaDLL.toluaL_exception(L, e); } } [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))] static int CloseGameServerConnect(IntPtr L) { try { ToLua.CheckArgsCount(L, 1); NetworkMgr obj = (NetworkMgr)ToLua.CheckObject(L, 1); obj.CloseGameServerConnect(); return 0; } catch (Exception e) { return LuaDLL.toluaL_exception(L, e); } } [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))] static int SetAesKey(IntPtr L) { try { ToLua.CheckArgsCount(L, 2); NetworkMgr obj = (NetworkMgr)ToLua.CheckObject(L, 1); string arg0 = ToLua.CheckString(L, 2); obj.SetAesKey(arg0); return 0; } catch (Exception e) { return LuaDLL.toluaL_exception(L, e); } } [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))] static int SendMsg(IntPtr L) { try { int count = LuaDLL.lua_gettop(L); if (count == 3) { NetworkMgr obj = (NetworkMgr)ToLua.CheckObject(L, 1); byte[] arg0 = ToLua.CheckByteBuffer(L, 2); ushort arg1 = (ushort)LuaDLL.luaL_checknumber(L, 3); bool o = obj.SendMsg(arg0, arg1); LuaDLL.lua_pushboolean(L, o); return 1; } else if (count == 4) { NetworkMgr obj = (NetworkMgr)ToLua.CheckObject(L, 1); byte[] arg0 = ToLua.CheckByteBuffer(L, 2); ushort arg1 = (ushort)LuaDLL.luaL_checknumber(L, 3); bool arg2 = LuaDLL.luaL_checkboolean(L, 4); bool o = obj.SendMsg(arg0, arg1, arg2); LuaDLL.lua_pushboolean(L, o); return 1; } else if (count == 5) { NetworkMgr obj = (NetworkMgr)ToLua.CheckObject(L, 1); byte[] arg0 = ToLua.CheckByteBuffer(L, 2); ushort arg1 = (ushort)LuaDLL.luaL_checknumber(L, 3); bool arg2 = LuaDLL.luaL_checkboolean(L, 4); bool arg3 = LuaDLL.luaL_checkboolean(L, 5); bool o = obj.SendMsg(arg0, arg1, arg2, arg3); LuaDLL.lua_pushboolean(L, o); return 1; } else { return LuaDLL.luaL_throw(L, "invalid arguments to method: NetworkMgr.SendMsg"); } } catch (Exception e) { return LuaDLL.toluaL_exception(L, e); } } [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))] static int SendMsgWithRSA(IntPtr L) { try { int count = LuaDLL.lua_gettop(L); if (count == 3) { NetworkMgr obj = (NetworkMgr)ToLua.CheckObject(L, 1); byte[] arg0 = ToLua.CheckByteBuffer(L, 2); ushort arg1 = (ushort)LuaDLL.luaL_checknumber(L, 3); bool o = obj.SendMsgWithRSA(arg0, arg1); LuaDLL.lua_pushboolean(L, o); return 1; } else if (count == 4) { NetworkMgr obj = (NetworkMgr)ToLua.CheckObject(L, 1); byte[] arg0 = ToLua.CheckByteBuffer(L, 2); ushort arg1 = (ushort)LuaDLL.luaL_checknumber(L, 3); bool arg2 = LuaDLL.luaL_checkboolean(L, 4); bool o = obj.SendMsgWithRSA(arg0, arg1, arg2); LuaDLL.lua_pushboolean(L, o); return 1; } else if (count == 5) { NetworkMgr obj = (NetworkMgr)ToLua.CheckObject(L, 1); byte[] arg0 = ToLua.CheckByteBuffer(L, 2); ushort arg1 = (ushort)LuaDLL.luaL_checknumber(L, 3); bool arg2 = LuaDLL.luaL_checkboolean(L, 4); bool arg3 = LuaDLL.luaL_checkboolean(L, 5); bool o = obj.SendMsgWithRSA(arg0, arg1, arg2, arg3); LuaDLL.lua_pushboolean(L, o); return 1; } else { return LuaDLL.luaL_throw(L, "invalid arguments to method: NetworkMgr.SendMsgWithRSA"); } } catch (Exception e) { return LuaDLL.toluaL_exception(L, e); } } [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))] static int SendMsgWithAES(IntPtr L) { try { int count = LuaDLL.lua_gettop(L); if (count == 3) { NetworkMgr obj = (NetworkMgr)ToLua.CheckObject(L, 1); byte[] arg0 = ToLua.CheckByteBuffer(L, 2); ushort arg1 = (ushort)LuaDLL.luaL_checknumber(L, 3); bool o = obj.SendMsgWithAES(arg0, arg1); LuaDLL.lua_pushboolean(L, o); return 1; } else if (count == 4) { NetworkMgr obj = (NetworkMgr)ToLua.CheckObject(L, 1); byte[] arg0 = ToLua.CheckByteBuffer(L, 2); ushort arg1 = (ushort)LuaDLL.luaL_checknumber(L, 3); bool arg2 = LuaDLL.luaL_checkboolean(L, 4); bool o = obj.SendMsgWithAES(arg0, arg1, arg2); LuaDLL.lua_pushboolean(L, o); return 1; } else if (count == 5) { NetworkMgr obj = (NetworkMgr)ToLua.CheckObject(L, 1); byte[] arg0 = ToLua.CheckByteBuffer(L, 2); ushort arg1 = (ushort)LuaDLL.luaL_checknumber(L, 3); bool arg2 = LuaDLL.luaL_checkboolean(L, 4); bool arg3 = LuaDLL.luaL_checkboolean(L, 5); bool o = obj.SendMsgWithAES(arg0, arg1, arg2, arg3); LuaDLL.lua_pushboolean(L, o); return 1; } else { return LuaDLL.luaL_throw(L, "invalid arguments to method: NetworkMgr.SendMsgWithAES"); } } catch (Exception e) { return LuaDLL.toluaL_exception(L, e); } } [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))] static int Update(IntPtr L) { try { ToLua.CheckArgsCount(L, 1); NetworkMgr obj = (NetworkMgr)ToLua.CheckObject(L, 1); obj.Update(); return 0; } catch (Exception e) { return LuaDLL.toluaL_exception(L, e); } } [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))] static int OnProtocolLua(IntPtr L) { try { ToLua.CheckArgsCount(L, 3); NetworkMgr obj = (NetworkMgr)ToLua.CheckObject(L, 1); byte[] arg0 = ToLua.CheckByteBuffer(L, 2); ushort arg1 = (ushort)LuaDLL.luaL_checknumber(L, 3); obj.OnProtocolLua(arg0, arg1); return 0; } catch (Exception e) { return LuaDLL.toluaL_exception(L, e); } } [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))] static int Resume(IntPtr L) { try { ToLua.CheckArgsCount(L, 1); NetworkMgr obj = (NetworkMgr)ToLua.CheckObject(L, 1); obj.Resume(); return 0; } catch (Exception e) { return LuaDLL.toluaL_exception(L, e); } } [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))] static int StartReconnect(IntPtr L) { try { ToLua.CheckArgsCount(L, 1); NetworkMgr obj = (NetworkMgr)ToLua.CheckObject(L, 1); obj.StartReconnect(); return 0; } catch (Exception e) { return LuaDLL.toluaL_exception(L, e); } } [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))] static int HasCmdIdAtConfirmQueue(IntPtr L) { try { ToLua.CheckArgsCount(L, 2); NetworkMgr obj = (NetworkMgr)ToLua.CheckObject(L, 1); ushort arg0 = (ushort)LuaDLL.luaL_checknumber(L, 2); bool o = obj.HasCmdIdAtConfirmQueue(arg0); LuaDLL.lua_pushboolean(L, o); return 1; } catch (Exception e) { return LuaDLL.toluaL_exception(L, e); } } [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))] static int get_gameSrv(IntPtr L) { object o = null; try { o = ToLua.ToObject(L, 1); NetworkMgr obj = (NetworkMgr)o; GameServerConnector ret = obj.gameSrv; ToLua.PushObject(L, ret); return 1; } catch(Exception e) { return LuaDLL.toluaL_exception(L, e, o, "attempt to index gameSrv on a nil value"); } } [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))] static int get_m_GameReconnetCount(IntPtr L) { object o = null; try { o = ToLua.ToObject(L, 1); NetworkMgr obj = (NetworkMgr)o; int ret = obj.m_GameReconnetCount; LuaDLL.lua_pushinteger(L, ret); return 1; } catch(Exception e) { return LuaDLL.toluaL_exception(L, e, o, "attempt to index m_GameReconnetCount on a nil value"); } } [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))] static int get_isOnlineMode(IntPtr L) { object o = null; try { o = ToLua.ToObject(L, 1); NetworkMgr obj = (NetworkMgr)o; bool ret = obj.isOnlineMode; LuaDLL.lua_pushboolean(L, ret); return 1; } catch(Exception e) { return LuaDLL.toluaL_exception(L, e, o, "attempt to index isOnlineMode on a nil value"); } } [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))] static int get_heartDelayTime(IntPtr L) { object o = null; try { o = ToLua.ToObject(L, 1); NetworkMgr obj = (NetworkMgr)o; int ret = obj.heartDelayTime; LuaDLL.lua_pushinteger(L, ret); return 1; } catch(Exception e) { return LuaDLL.toluaL_exception(L, e, o, "attempt to index heartDelayTime on a nil value"); } } [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))] static int get_ReceiveMessageFunc(IntPtr L) { object o = null; try { o = ToLua.ToObject(L, 1); NetworkMgr obj = (NetworkMgr)o; LuaInterface.LuaFunction ret = obj.ReceiveMessageFunc; ToLua.Push(L, ret); return 1; } catch(Exception e) { return LuaDLL.toluaL_exception(L, e, o, "attempt to index ReceiveMessageFunc on a nil value"); } } [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))] static int get_OpenReconnectionWndFunc(IntPtr L) { object o = null; try { o = ToLua.ToObject(L, 1); NetworkMgr obj = (NetworkMgr)o; LuaInterface.LuaFunction ret = obj.OpenReconnectionWndFunc; ToLua.Push(L, ret); return 1; } catch(Exception e) { return LuaDLL.toluaL_exception(L, e, o, "attempt to index OpenReconnectionWndFunc on a nil value"); } } [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))] static int get_LuaNoitceFunc(IntPtr L) { object o = null; try { o = ToLua.ToObject(L, 1); NetworkMgr obj = (NetworkMgr)o; LuaInterface.LuaFunction ret = obj.LuaNoitceFunc; ToLua.Push(L, ret); return 1; } catch(Exception e) { return LuaDLL.toluaL_exception(L, e, o, "attempt to index LuaNoitceFunc on a nil value"); } } [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))] static int get_IsLogin(IntPtr L) { object o = null; try { o = ToLua.ToObject(L, 1); NetworkMgr obj = (NetworkMgr)o; bool ret = obj.IsLogin; LuaDLL.lua_pushboolean(L, ret); return 1; } catch(Exception e) { return LuaDLL.toluaL_exception(L, e, o, "attempt to index IsLogin on a nil value"); } } [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))] static int set_gameSrv(IntPtr L) { object o = null; try { o = ToLua.ToObject(L, 1); NetworkMgr obj = (NetworkMgr)o; GameServerConnector arg0 = (GameServerConnector)ToLua.CheckObject(L, 2); obj.gameSrv = arg0; return 0; } catch(Exception e) { return LuaDLL.toluaL_exception(L, e, o, "attempt to index gameSrv on a nil value"); } } [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))] static int set_m_GameReconnetCount(IntPtr L) { object o = null; try { o = ToLua.ToObject(L, 1); NetworkMgr obj = (NetworkMgr)o; int arg0 = (int)LuaDLL.luaL_checknumber(L, 2); obj.m_GameReconnetCount = arg0; return 0; } catch(Exception e) { return LuaDLL.toluaL_exception(L, e, o, "attempt to index m_GameReconnetCount on a nil value"); } } [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))] static int set_isOnlineMode(IntPtr L) { object o = null; try { o = ToLua.ToObject(L, 1); NetworkMgr obj = (NetworkMgr)o; bool arg0 = LuaDLL.luaL_checkboolean(L, 2); obj.isOnlineMode = arg0; return 0; } catch(Exception e) { return LuaDLL.toluaL_exception(L, e, o, "attempt to index isOnlineMode on a nil value"); } } [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))] static int set_ReceiveMessageFunc(IntPtr L) { object o = null; try { o = ToLua.ToObject(L, 1); NetworkMgr obj = (NetworkMgr)o; LuaFunction arg0 = ToLua.CheckLuaFunction(L, 2); obj.ReceiveMessageFunc = arg0; return 0; } catch(Exception e) { return LuaDLL.toluaL_exception(L, e, o, "attempt to index ReceiveMessageFunc on a nil value"); } } [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))] static int set_OpenReconnectionWndFunc(IntPtr L) { object o = null; try { o = ToLua.ToObject(L, 1); NetworkMgr obj = (NetworkMgr)o; LuaFunction arg0 = ToLua.CheckLuaFunction(L, 2); obj.OpenReconnectionWndFunc = arg0; return 0; } catch(Exception e) { return LuaDLL.toluaL_exception(L, e, o, "attempt to index OpenReconnectionWndFunc on a nil value"); } } [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))] static int set_LuaNoitceFunc(IntPtr L) { object o = null; try { o = ToLua.ToObject(L, 1); NetworkMgr obj = (NetworkMgr)o; LuaFunction arg0 = ToLua.CheckLuaFunction(L, 2); obj.LuaNoitceFunc = arg0; return 0; } catch(Exception e) { return LuaDLL.toluaL_exception(L, e, o, "attempt to index LuaNoitceFunc on a nil value"); } } [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))] static int set_IsLogin(IntPtr L) { object o = null; try { o = ToLua.ToObject(L, 1); NetworkMgr obj = (NetworkMgr)o; bool arg0 = LuaDLL.luaL_checkboolean(L, 2); obj.IsLogin = arg0; return 0; } catch(Exception e) { return LuaDLL.toluaL_exception(L, e, o, "attempt to index IsLogin on a nil value"); } } }