コード例 #1
0
ファイル: HttpThread.cs プロジェクト: wxl-007/ShadowDota
 void Dispose()
 {
     httpClient = null;
     httpDataCom.OnUnregister(null);
     httpDataCom = null;
     _engine     = null;
 }
コード例 #2
0
 public void RegisterToHttpEngine(HttpThread httpEngine)
 {
     if (httpEngine != null)
     {
         httpEngine.Http_OnException = Http_OnException;
         httpEngine.Http_OnReceive   = Http_OnReceive;
     }
 }
コード例 #3
0
ファイル: HttpThread.cs プロジェクト: mengtest/DragonBallNew
    void ICore.Dispose()
    {
        httpClient = null;

        ICore IhttpDataCom = httpDataCom as ICore;

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

        _engine = null;
    }
コード例 #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;
            }
        }
コード例 #5
0
 public NetworkEngine()
 {
     httpEngine = HttpThread.getInstance();
     SockEngine = SocketEngine.getInstance();
 }
コード例 #6
0
ファイル: HttpThread.cs プロジェクト: mengtest/DragonBallNew
 public static HttpThread getInstance()
 {
     return(_engine ?? (_engine = new HttpThread()));
 }