/// <summary> /// Handle received message /// </summary> /// <param name="message">message to handle</param> public override void HandleRecvMessage(SFMessage message) { if (OnMessageProcessing != null) { OnMessageProcessing(message); } SortedList <int, Action <SFMessage> > handlerList = null; lock (m_MessageHandlerMap) { m_MessageHandlerMap.TryGetValue(message.GetMessageID(), out handlerList); } if (handlerList != null) { lock (handlerList) { foreach (var handler in handlerList) { handler.Value(message); } } } }
public void Dispose() { if (pMsg != null) { pMsg.Dispose(); } pMsg = null; }
public void AddLoopBackMessage(SFMessage msg) { if (msg == null) { return; } lock (m_LoopBackQueue) { m_LoopBackQueue.Enqueue(msg); } }
/// <summary> /// Handle received message /// </summary> /// <param name="message">message to handle</param> public virtual void HandleRecvMessage(SFMessage message) { }
static internal void MessageParseCreateCallback(UInt32 messageID) { System.Diagnostics.Debug.Assert(stm_ParsingMessage == null); stm_ParsingMessage = new SFMessage((int)messageID); }