Пример #1
0
 public static void SendAll(ChatSession session, MsgInfo msg)
 {
     foreach (var chatSession in session.AppServer.GetSessions(sess => sess.SessionID != session.SessionID))
     {
         Send(chatSession, msg);
     }
 }
Пример #2
0
 public static void SendAll(ChatSession session, MsgFrame frame)
 {
     foreach (var chatSession in session.AppServer.GetSessions(sess => sess.SessionID != session.SessionID))
     {
         Send(chatSession, frame);
     }
 }
Пример #3
0
        public static void SendResoveFailed(ChatSession session, MsgInfo msg, StringRequestInfo requestInfo)
        {
            session.Logger.DebugFormat("Got command: {0}=>{1}", requestInfo.Key, requestInfo.Body);

            msg.Success = false;
            msg.Message = string.Format("Invalid request({0}): cannot parse data", requestInfo.Key);
            Send(session, msg);
        }
Пример #4
0
        public static void Send(ChatSession session, MsgInfo msg)
        {
            var frames = msg.ToFrame();

            foreach (var frame in frames)
            {
                Send(session, frame);
            }
        }
Пример #5
0
        public static void Send(ChatSession session, MsgFrame frame)
        {
            var temp = frame.ToString();

            session.Send(temp);
        }