public override void SetIoHandler(INetworkEventHandler handler) { base.SetIoHandler(handler); if (handler is NetworkEventHandler) { m_Events = (handler as NetworkEventHandler).Events; m_Handlers = (handler as NetworkEventHandler).GetHandlerManager(); } }
public void AddHandlers(HandlerManager mgr) { if (mgr == null || mgr.m_HandlerMap.Count <= 0) return; foreach (KeyValuePair<Int32, IHandler> item in mgr.m_HandlerMap) { Int32 code = item.Key; IHandler handler = item.Value; if (!m_HandlerMap.ContainsKey(code)) { m_HandlerMap.Add(code, handler); } } }
public void AddHandlers(HandlerManager mgr) { if (mgr == null || mgr.m_HandlerMap.Count <= 0) { return; } foreach (KeyValuePair <Int32, IHandler> item in mgr.m_HandlerMap) { Int32 code = item.Key; IHandler handler = item.Value; if (!m_HandlerMap.ContainsKey(code)) { m_HandlerMap.Add(code, handler); } } }
public NetworkEventHandler(HandlerManager messageHandlerManager, NetworkEventPackage events) : base(events) { m_MessageHandlerManager = messageHandlerManager; AllowOrderlyProcess = false; }
public NetworkEventHandler(HandlerManager messageHandlerManager) : base(null) { m_MessageHandlerManager = messageHandlerManager; AllowOrderlyProcess = false; }