static int _s_set_MessageDispatcher(RealStatePtr L) { try { ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); DCET.Model.NetworkComponent gen_to_be_invoked = (DCET.Model.NetworkComponent)translator.FastGetCSObj(L, 1); gen_to_be_invoked.MessageDispatcher = (DCET.Model.IMessageDispatcher)translator.GetObject(L, 2, typeof(DCET.Model.IMessageDispatcher)); } catch (System.Exception gen_e) { return(LuaAPI.luaL_error(L, "c# exception:" + gen_e)); } return(0); }
static int _g_get_Sessions(RealStatePtr L) { try { ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); DCET.Model.NetworkComponent gen_to_be_invoked = (DCET.Model.NetworkComponent)translator.FastGetCSObj(L, 1); translator.Push(L, gen_to_be_invoked.Sessions); } catch (System.Exception gen_e) { return(LuaAPI.luaL_error(L, "c# exception:" + gen_e)); } return(1); }
static int _m_Dispose(RealStatePtr L) { try { ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); DCET.Model.NetworkComponent gen_to_be_invoked = (DCET.Model.NetworkComponent)translator.FastGetCSObj(L, 1); { gen_to_be_invoked.Dispose( ); return(0); } } catch (System.Exception gen_e) { return(LuaAPI.luaL_error(L, "c# exception:" + gen_e)); } }
static int _m_Create(RealStatePtr L) { try { ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); DCET.Model.NetworkComponent gen_to_be_invoked = (DCET.Model.NetworkComponent)translator.FastGetCSObj(L, 1); int gen_param_count = LuaAPI.lua_gettop(L); if (gen_param_count == 2 && translator.Assignable <System.Net.IPEndPoint>(L, 2)) { System.Net.IPEndPoint _ipEndPoint = (System.Net.IPEndPoint)translator.GetObject(L, 2, typeof(System.Net.IPEndPoint)); DCET.Model.Session gen_ret = gen_to_be_invoked.Create(_ipEndPoint); translator.Push(L, gen_ret); return(1); } if (gen_param_count == 2 && (LuaAPI.lua_isnil(L, 2) || LuaAPI.lua_type(L, 2) == LuaTypes.LUA_TSTRING)) { string _address = LuaAPI.lua_tostring(L, 2); DCET.Model.Session gen_ret = gen_to_be_invoked.Create(_address); translator.Push(L, gen_ret); return(1); } } catch (System.Exception gen_e) { return(LuaAPI.luaL_error(L, "c# exception:" + gen_e)); } return(LuaAPI.luaL_error(L, "invalid arguments to DCET.Model.NetworkComponent.Create!")); }
static int _m_Get(RealStatePtr L) { try { ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); DCET.Model.NetworkComponent gen_to_be_invoked = (DCET.Model.NetworkComponent)translator.FastGetCSObj(L, 1); { long _id = LuaAPI.lua_toint64(L, 2); DCET.Model.Session gen_ret = gen_to_be_invoked.Get(_id); translator.Push(L, gen_ret); return(1); } } catch (System.Exception gen_e) { return(LuaAPI.luaL_error(L, "c# exception:" + gen_e)); } }
static int _m_OnAccept(RealStatePtr L) { try { ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); DCET.Model.NetworkComponent gen_to_be_invoked = (DCET.Model.NetworkComponent)translator.FastGetCSObj(L, 1); { DCET.Model.AChannel _channel = (DCET.Model.AChannel)translator.GetObject(L, 2, typeof(DCET.Model.AChannel)); DCET.Model.Session gen_ret = gen_to_be_invoked.OnAccept(_channel); translator.Push(L, gen_ret); return(1); } } catch (System.Exception gen_e) { return(LuaAPI.luaL_error(L, "c# exception:" + gen_e)); } }
static int _m_Awake(RealStatePtr L) { try { ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); DCET.Model.NetworkComponent gen_to_be_invoked = (DCET.Model.NetworkComponent)translator.FastGetCSObj(L, 1); int gen_param_count = LuaAPI.lua_gettop(L); if (gen_param_count == 3 && translator.Assignable <DCET.Model.NetworkProtocol>(L, 2) && LuaTypes.LUA_TNUMBER == LuaAPI.lua_type(L, 3)) { DCET.Model.NetworkProtocol _protocol; translator.Get(L, 2, out _protocol); int _packetSize = LuaAPI.xlua_tointeger(L, 3); gen_to_be_invoked.Awake(_protocol, _packetSize); return(0); } if (gen_param_count == 2 && translator.Assignable <DCET.Model.NetworkProtocol>(L, 2)) { DCET.Model.NetworkProtocol _protocol; translator.Get(L, 2, out _protocol); gen_to_be_invoked.Awake(_protocol); return(0); } if (gen_param_count == 4 && translator.Assignable <DCET.Model.NetworkProtocol>(L, 2) && (LuaAPI.lua_isnil(L, 3) || LuaAPI.lua_type(L, 3) == LuaTypes.LUA_TSTRING) && LuaTypes.LUA_TNUMBER == LuaAPI.lua_type(L, 4)) { DCET.Model.NetworkProtocol _protocol; translator.Get(L, 2, out _protocol); string _address = LuaAPI.lua_tostring(L, 3); int _packetSize = LuaAPI.xlua_tointeger(L, 4); gen_to_be_invoked.Awake(_protocol, _address, _packetSize); return(0); } if (gen_param_count == 3 && translator.Assignable <DCET.Model.NetworkProtocol>(L, 2) && (LuaAPI.lua_isnil(L, 3) || LuaAPI.lua_type(L, 3) == LuaTypes.LUA_TSTRING)) { DCET.Model.NetworkProtocol _protocol; translator.Get(L, 2, out _protocol); string _address = LuaAPI.lua_tostring(L, 3); gen_to_be_invoked.Awake(_protocol, _address); return(0); } } catch (System.Exception gen_e) { return(LuaAPI.luaL_error(L, "c# exception:" + gen_e)); } return(LuaAPI.luaL_error(L, "invalid arguments to DCET.Model.NetworkComponent.Awake!")); }