private static void OnUpdateSocketServerSessionMessageReceived(UpdateSocketServerSessionMessage message)
 {
     if (ChatSessionManager.TryGet(message.SessionId, out ChatSession session))
     {
         session.UpdateSocketServerSessionMessageReceived(message);
     }
 }
        private static void OnForwardLogicMessageReceived(ForwardLogicMessage message)
        {
            if (ChatSessionManager.TryGet(message.SessionId, out ChatSession session))
            {
                PiranhaMessage logicMessage = LogicMagicMessageFactory.Instance.CreateMessageByType(message.MessageType);

                if (logicMessage == null)
                {
                    throw new Exception("logicMessage should not be NULL!");
                }

                logicMessage.GetByteStream().SetByteArray(message.MessageBytes, message.MessageLength);
                logicMessage.SetMessageVersion(message.MessageVersion);
                logicMessage.Decode();

                if (!logicMessage.IsServerToClientMessage())
                {
                    session.LogicMessageManager.ReceiveMessage(logicMessage);
                }
            }
        }