示例#1
0
 ///-----------------------------------------------------------------------------
 /// <summary>
 /// 初始化网络层配置和对象
 /// </summary>
 ///-----------------------------------------------------------------------------
 public void InitNetwork(ClientAppArgs args)
 {
     _args = args;
     for (int i = 0; i < 50; ++i)
     {
         mReceiveStreamsPool.Add(new StreamMemory());
     }
 }
示例#2
0
    public virtual void InitClientApp()
    {
        ClientAppArgs args = new ClientAppArgs();

        args.ip             = ip;
        args.port           = port;
        args.clientType     = clientType;
        args.threadUpdateHZ = threadUpdateHZ;

        gameapp = new ClientApp(args);
    }
示例#3
0
    public ClientApp(ClientAppArgs args)
    {
        if (intstance != null)
        {
            throw new Exception("Only one instance of KBEngineApp!");
        }

        intstance = this;
        _args     = args;
        InitFramework();
    }
示例#4
0
    static int _CreateSimpleFramework_AppConst(IntPtr L)
    {
        int count = LuaDLL.lua_gettop(L);

        if (count == 0)
        {
            ClientAppArgs obj = new ClientAppArgs();
            LuaScriptMgr.PushObject(L, obj);
            return(1);
        }
        else
        {
            LuaDLL.luaL_error(L, "invalid arguments to method: SimpleFramework.AppConst.New");
        }

        return(0);
    }