Beispiel #1
0
        static int _m_SendConnect(RealStatePtr L)
        {
            try {
                ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);


                XLuaFramework.NetworkManager gen_to_be_invoked = (XLuaFramework.NetworkManager)translator.FastGetCSObj(L, 1);



                {
                    string _host = LuaAPI.lua_tostring(L, 2);
                    int    _port = LuaAPI.xlua_tointeger(L, 3);
                    XLuaFramework.NetPackageType _type; translator.Get(L, 4, out _type);

                    gen_to_be_invoked.SendConnect(_host, _port, _type);



                    return(0);
                }
            } catch (System.Exception gen_e) {
                return(LuaAPI.luaL_error(L, "c# exception:" + gen_e));
            }
        }
Beispiel #2
0
        static int _s_set_OnReceiveMsgCallBack(RealStatePtr L)
        {
            try {
                ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);

                XLuaFramework.NetworkManager gen_to_be_invoked = (XLuaFramework.NetworkManager)translator.FastGetCSObj(L, 1);
                gen_to_be_invoked.OnReceiveMsgCallBack = translator.GetDelegate <System.Action <byte[]> >(L, 2);
            } catch (System.Exception gen_e) {
                return(LuaAPI.luaL_error(L, "c# exception:" + gen_e));
            }
            return(0);
        }
Beispiel #3
0
        static int _g_get_OnReceiveMsgCallBack(RealStatePtr L)
        {
            try {
                ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);

                XLuaFramework.NetworkManager gen_to_be_invoked = (XLuaFramework.NetworkManager)translator.FastGetCSObj(L, 1);
                translator.Push(L, gen_to_be_invoked.OnReceiveMsgCallBack);
            } catch (System.Exception gen_e) {
                return(LuaAPI.luaL_error(L, "c# exception:" + gen_e));
            }
            return(1);
        }
Beispiel #4
0
        static int __CreateInstance(RealStatePtr L)
        {
            try {
                ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
                if (LuaAPI.lua_gettop(L) == 1)
                {
                    XLuaFramework.NetworkManager gen_ret = new XLuaFramework.NetworkManager();
                    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 XLuaFramework.NetworkManager constructor!"));
        }
Beispiel #5
0
        static int _m_GetInstance_xlua_st_(RealStatePtr L)
        {
            try {
                ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);



                {
                    XLuaFramework.NetworkManager gen_ret = XLuaFramework.NetworkManager.GetInstance(  );
                    translator.Push(L, gen_ret);



                    return(1);
                }
            } catch (System.Exception gen_e) {
                return(LuaAPI.luaL_error(L, "c# exception:" + gen_e));
            }
        }
Beispiel #6
0
        public XLuaFramework.NetworkManager __Gen_Delegate_Imp26()
        {
#if THREAD_SAFE || HOTFIX_ENABLE
            lock (luaEnv.luaEnvLock)
            {
#endif
            RealStatePtr L = luaEnv.rawL;
            int errFunc    = LuaAPI.pcall_prepare(L, errorFuncRef, luaReference);
            ObjectTranslator translator = luaEnv.translator;

            PCall(L, 0, 1, errFunc);


            XLuaFramework.NetworkManager __gen_ret = (XLuaFramework.NetworkManager)translator.GetObject(L, errFunc + 1, typeof(XLuaFramework.NetworkManager));
            LuaAPI.lua_settop(L, errFunc - 1);
            return(__gen_ret);

#if THREAD_SAFE || HOTFIX_ENABLE
        }
#endif
        }
        static int _m_Close(RealStatePtr L)
        {
            try {
                ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);


                XLuaFramework.NetworkManager gen_to_be_invoked = (XLuaFramework.NetworkManager)translator.FastGetCSObj(L, 1);



                {
                    gen_to_be_invoked.Close(  );



                    return(0);
                }
            } catch (System.Exception gen_e) {
                return(LuaAPI.luaL_error(L, "c# exception:" + gen_e));
            }
        }
Beispiel #8
0
        static int _m_SendBytesWithoutSize(RealStatePtr L)
        {
            try {
                ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);


                XLuaFramework.NetworkManager gen_to_be_invoked = (XLuaFramework.NetworkManager)translator.FastGetCSObj(L, 1);



                {
                    byte[] _message = LuaAPI.lua_tobytes(L, 2);

                    gen_to_be_invoked.SendBytesWithoutSize(_message);



                    return(0);
                }
            } catch (System.Exception gen_e) {
                return(LuaAPI.luaL_error(L, "c# exception:" + gen_e));
            }
        }