示例#1
0
 public static SendMessageHandler GetInstance()
 {
     if (Instance == null)
     {
         Instance = new SendMessageHandler();
     }
     return(Instance);
 }
示例#2
0
        public void process(Session session, SocketModel model)
        {
            try
            {
                switch (model.type)
                {
                case Type.Create:
                    CreateHandler.GetInstance().process(session, model);
                    break;

                case Type.SendMessage:
                    SendMessageHandler.GetInstance().process(session, model);
                    break;

                default:

                    break;
                }
            }
            catch (Exception e)
            {
                Log.form.AddText(e.ToString());
            }
        }