static int _s_set_mListener(RealStatePtr L)
        {
            ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);

            try {
                Net.NetClient __cl_gen_to_be_invoked = (Net.NetClient)translator.FastGetCSObj(L, 1);
                __cl_gen_to_be_invoked.mListener = (Net.NetClient.IListener)translator.GetObject(L, 2, typeof(Net.NetClient.IListener));
            } catch (System.Exception __gen_e) {
                return(LuaAPI.luaL_error(L, "c# exception:" + __gen_e));
            }
            return(0);
        }
        static int _g_get_Encrypt(RealStatePtr L)
        {
            ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);

            try {
                Net.NetClient __cl_gen_to_be_invoked = (Net.NetClient)translator.FastGetCSObj(L, 1);
                translator.Push(L, __cl_gen_to_be_invoked.Encrypt);
            } catch (System.Exception __gen_e) {
                return(LuaAPI.luaL_error(L, "c# exception:" + __gen_e));
            }
            return(1);
        }
Exemple #3
0
        static int __CreateInstance(RealStatePtr L)
        {
            ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);

            try {
                if (LuaAPI.lua_gettop(L) == 2 && translator.Assignable <Net.NetClient>(L, 2))
                {
                    Net.NetClient p = (Net.NetClient)translator.GetObject(L, 2, typeof(Net.NetClient));

                    Net.NetClient.MutiPacketHelp __cl_gen_ret = new Net.NetClient.MutiPacketHelp(p);
                    translator.Push(L, __cl_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 Net.NetClient.MutiPacketHelp constructor!"));
        }
        static int _m_GetCrossClient_xlua_st_(RealStatePtr L)
        {
            ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);



            try {
                {
                    Net.NetClient __cl_gen_ret = Net.NetClient.GetCrossClient(  );
                    translator.Push(L, __cl_gen_ret);



                    return(1);
                }
            } catch (System.Exception __gen_e) {
                return(LuaAPI.luaL_error(L, "c# exception:" + __gen_e));
            }
        }
        static int _m_Update(RealStatePtr L)
        {
            ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);


            Net.NetClient __cl_gen_to_be_invoked = (Net.NetClient)translator.FastGetCSObj(L, 1);


            try {
                {
                    __cl_gen_to_be_invoked.Update(  );



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


            Net.NetClient __cl_gen_to_be_invoked = (Net.NetClient)translator.FastGetCSObj(L, 1);


            try {
                {
                    ushort protocol = (ushort)LuaAPI.xlua_tointeger(L, 2);
                    byte[] data     = LuaAPI.lua_tobytes(L, 3);

                    __cl_gen_to_be_invoked.SendLuaData(protocol, data);



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


            Net.NetClient __cl_gen_to_be_invoked = (Net.NetClient)translator.FastGetCSObj(L, 1);


            try {
                {
                    ushort protocol = (ushort)LuaAPI.xlua_tointeger(L, 2);
                    object c2sPack  = translator.GetObject(L, 3, typeof(object));

                    __cl_gen_to_be_invoked.SendData(protocol, c2sPack);



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


            Net.NetClient __cl_gen_to_be_invoked = (Net.NetClient)translator.FastGetCSObj(L, 1);


            try {
                {
                    string ip   = LuaAPI.lua_tostring(L, 2);
                    int    port = LuaAPI.xlua_tointeger(L, 3);

                    __cl_gen_to_be_invoked.Start(ip, port);



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