Exemplo n.º 1
0
 void Dispose()
 {
     httpClient = null;
     httpDataCom.OnUnregister(null);
     httpDataCom = null;
     _engine     = null;
 }
Exemplo n.º 2
0
 public void RegisterToHttpEngine(HttpThread httpEngine)
 {
     if (httpEngine != null)
     {
         httpEngine.Http_OnException = Http_OnException;
         httpEngine.Http_OnReceive   = Http_OnReceive;
     }
 }
Exemplo n.º 3
0
    void ICore.Dispose()
    {
        httpClient = null;

        ICore IhttpDataCom = httpDataCom as ICore;

        if (IhttpDataCom != null)
        {
            IhttpDataCom.Dispose();
        }
        httpDataCom = null;

        _engine = null;
    }
Exemplo n.º 4
0
        /// <summary>
        /// 依赖的网络层
        /// </summary>
        public EventCenter(HttpThread httpEngine, SocketEngine sockEngine, EntityManager entityMgr)
        {
            exchange = new Dictionary <MsgType, Action <BaseTaskAbstract> >();

            this.httpEngine = httpEngine;
            this.sockEngine = sockEngine;
            this.entityMgr  = entityMgr;

            if (httpEngine != null)
            {
                httpEngine.Http_OnException = Http_OnException;
                httpEngine.Http_OnReceive   = Http_OnReceive;
            }

            if (sockEngine != null)
            {
                sockEngine.Socket_OnException   = Sock_OnException;
                sockEngine.Socket_OnReceive     = Sock_OnReceive;
                sockEngine.Socket_CommException = Sock_OnCommonExcption;
            }
        }
Exemplo n.º 5
0
 public NetworkEngine()
 {
     httpEngine = HttpThread.getInstance();
     SockEngine = SocketEngine.getInstance();
 }
Exemplo n.º 6
0
 public static HttpThread getInstance()
 {
     return(_engine ?? (_engine = new HttpThread()));
 }