void Dispose() { httpClient = null; httpDataCom.OnUnregister(null); httpDataCom = null; _engine = null; }
public void RegisterToHttpEngine(HttpThread httpEngine) { if (httpEngine != null) { httpEngine.Http_OnException = Http_OnException; httpEngine.Http_OnReceive = Http_OnReceive; } }
void ICore.Dispose() { httpClient = null; ICore IhttpDataCom = httpDataCom as ICore; if (IhttpDataCom != null) { IhttpDataCom.Dispose(); } httpDataCom = null; _engine = null; }
/// <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; } }
public NetworkEngine() { httpEngine = HttpThread.getInstance(); SockEngine = SocketEngine.getInstance(); }
public static HttpThread getInstance() { return(_engine ?? (_engine = new HttpThread())); }