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


                WsGame __cl_gen_to_be_invoked = (WsGame)translator.FastGetCSObj(L, 1);



                {
                    string            url        = LuaAPI.lua_tostring(L, 2);
                    ConnectCallback   callback   = translator.GetDelegate <ConnectCallback>(L, 3);
                    OnMessageCallback msgHandler = translator.GetDelegate <OnMessageCallback>(L, 4);

                    __cl_gen_to_be_invoked.Connect(url, callback, msgHandler);



                    return(0);
                }
            } catch (System.Exception __gen_e) {
                return(LuaAPI.luaL_error(L, "c# exception:" + __gen_e));
            }
        }
        static int __CreateInstance(RealStatePtr L)
        {
            try {
                ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
                if (LuaAPI.lua_gettop(L) == 1)
                {
                    WsGame __cl_gen_ret = new WsGame();
                    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 WsGame constructor!"));
        }
        static int _m_SendMsg(RealStatePtr L)
        {
            try {
                ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);


                WsGame __cl_gen_to_be_invoked = (WsGame)translator.FastGetCSObj(L, 1);



                {
                    Protocol.ProtocolBase msg = (Protocol.ProtocolBase)translator.GetObject(L, 2, typeof(Protocol.ProtocolBase));

                    __cl_gen_to_be_invoked.SendMsg(msg);



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